Add HAVE_QT ifdefs

(cherry picked from commit 9f74b05b13eb9875d9d7df55e533f45ed79a831d)
This commit is contained in:
twinaphex 2018-10-14 18:38:15 -07:00 committed by Stuart Carnie
parent 7880e11ca0
commit 0db432ca68
No known key found for this signature in database
GPG Key ID: 848D9C9718D78B4F

View File

@ -235,16 +235,29 @@ static char** waiting_argv;
{
int ret;
unsigned sleep_ms = 0;
#ifdef HAVE_QT
const ui_application_t *application = ui_application_qt.process_events();
#else
const ui_application_t *application = ui_companion_driver_get_application_ptr();
#endif
if (application)
application->process_events();
ret = runloop_iterate(&sleep_ms);
if (ret == 1 && sleep_ms > 0)
retro_sleep(sleep_ms);
task_queue_check();
while(CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.002, FALSE) == kCFRunLoopRunHandledSource);
if (ret == -1)
{
#ifdef HAVE_QT
ui_application_qt.quit();
#endif
break;
}
}while(1);
main_exit(NULL);