From 71086283691f0247459df827de41de472a4874a2 Mon Sep 17 00:00:00 2001 From: Dwedit Date: Wed, 4 Jul 2018 14:20:38 -0500 Subject: [PATCH] Moved WIN32 message loop out of win32_check_window, and into just before the call to runloop_iterate --- frontend/frontend.c | 7 ++++++- gfx/common/win32_common.c | 6 +----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/frontend.c b/frontend/frontend.c index b144761490..1ae4abc3f0 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -138,7 +138,12 @@ int rarch_main(int argc, char *argv[], void *data) do { unsigned sleep_ms = 0; - int ret = runloop_iterate(&sleep_ms); + int ret; + const ui_application_t *application = + ui_companion_driver_get_application_ptr(); + if (application) + application->process_events(); + ret = runloop_iterate(&sleep_ms); if (ret == 1 && sleep_ms > 0) retro_sleep(sleep_ms); diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index a95ee155c9..b4bcbc0481 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -1117,12 +1117,7 @@ void win32_check_window(bool *quit, bool *resize, unsigned *width, unsigned *height) { #if !defined(_XBOX) - const ui_application_t *application = - ui_companion_driver_get_application_ptr(); - if (application) - application->process_events(); *quit = g_win32_quit; -#endif if (g_win32_resized) { @@ -1131,6 +1126,7 @@ void win32_check_window(bool *quit, bool *resize, *height = g_win32_resize_height; g_win32_resized = false; } +#endif } bool win32_suppress_screensaver(void *data, bool enable)