- //wait for thread to finish
- pthread_join(main_loop_thread, NULL);
-
+ if (display && strlen(display) > 1)
+ {
+ InitGraphics(argc, argv, script_cmds_file, usb_present);
+ MainGraphics();
+ }
+ else
+ {
+ main_loop(script_cmds_file, usb_present);
+ }
+#endif
+#else
+ main_loop(script_cmds_file, usb_present);
+#endif