diff --git a/ui/drivers/ui_cocoatouch.m b/ui/drivers/ui_cocoatouch.m index 6aa1a9b4b0..c16afc9ebc 100644 --- a/ui/drivers/ui_cocoatouch.m +++ b/ui/drivers/ui_cocoatouch.m @@ -71,12 +71,16 @@ static void rarch_draw_observer(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info) { bool is_idle; + bool sleeping = false; unsigned sleep_ms = 0; int ret = rarch_main_iterate(&sleep_ms); if (ret == 1 && !ui_companion_is_on_foreground() && sleep_ms > 0) + { + sleeping = true; retro_sleep(sleep_ms); - rarch_main_data_iterate(); + } + rarch_main_data_iterate(sleeping); if (ret == -1) {