diff --git a/menu/cbs/menu_cbs_select.c b/menu/cbs/menu_cbs_select.c index dedc634dc5..d997ec5905 100644 --- a/menu/cbs/menu_cbs_select.c +++ b/menu/cbs/menu_cbs_select.c @@ -78,7 +78,7 @@ static int action_select_default(const char *path, const char *label, unsigned t if (action != MENU_ACTION_NOOP) ret = menu_entry_action(&entry, idx, action); - rarch_main_data_iterate(); + rarch_main_data_iterate(false); return ret; } diff --git a/runloop_data.c b/runloop_data.c index 26422c4ff3..41603fc36c 100644 --- a/runloop_data.c +++ b/runloop_data.c @@ -31,10 +31,11 @@ void rarch_main_data_deinit(void) rarch_task_deinit(); } -void rarch_main_data_iterate(void) +void rarch_main_data_iterate(bool sleeping) { #ifdef HAVE_MENU - menu_iterate_render(); + if (!sleeping) + menu_iterate_render(); #endif if (data_runloop_msg[0] != '\0') diff --git a/runloop_data.h b/runloop_data.h index ed28825326..92c63d9b37 100644 --- a/runloop_data.h +++ b/runloop_data.h @@ -26,7 +26,7 @@ typedef int (*transfer_cb_t)(void *data, size_t len); void rarch_main_data_clear_state(void); -void rarch_main_data_iterate(void); +void rarch_main_data_iterate(bool sleeping); void rarch_main_data_deinit(void); diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index 005ff432bf..a84d99f25e 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -226,12 +226,16 @@ static void poll_iteration(void) int ret = 0; while (ret != -1) { + bool sleeping = false; unsigned sleep_ms = 0; poll_iteration(); ret = rarch_main_iterate(&sleep_ms); if (ret == 1 && sleep_ms > 0) + { + sleeping = true; retro_sleep(sleep_ms); - rarch_main_data_iterate(); + } + rarch_main_data_iterate(sleeping); while(CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.002, FALSE) == kCFRunLoopRunHandledSource); }