diff --git a/frontend/drivers/platform_emscripten.c b/frontend/drivers/platform_emscripten.c index e915e8f18d..e0a9a33105 100644 --- a/frontend/drivers/platform_emscripten.c +++ b/frontend/drivers/platform_emscripten.c @@ -34,7 +34,7 @@ static void emscripten_mainloop(void) int ret = runloop_iterate(&sleep_ms); if (ret == 1 && sleep_ms > 0) retro_sleep(sleep_ms); - runloop_ctl(RUNLOOP_CTL_DATA_ITERATE, NULL); + runloop_iterate_data(); if (ret != -1) return; diff --git a/frontend/drivers/platform_linux.c b/frontend/drivers/platform_linux.c index 6d45389c3c..634f60c05a 100644 --- a/frontend/drivers/platform_linux.c +++ b/frontend/drivers/platform_linux.c @@ -742,7 +742,7 @@ static void android_app_entry(void *data) if (ret == 1 && sleep_ms > 0) retro_sleep(sleep_ms); - runloop_ctl(RUNLOOP_CTL_DATA_ITERATE, NULL); + runloop_iterate_data(); }while (ret != -1); main_exit(data); diff --git a/frontend/frontend.c b/frontend/frontend.c index e8037df0fb..7922589f47 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -164,7 +164,7 @@ int rarch_main(int argc, char *argv[], void *data) if (ret == 1 && sleep_ms > 0) retro_sleep(sleep_ms); - runloop_ctl(RUNLOOP_CTL_DATA_ITERATE, NULL); + runloop_iterate_data(); }while(ret != -1); main_exit(args); diff --git a/menu/cbs/menu_cbs_select.c b/menu/cbs/menu_cbs_select.c index 2185222969..9893791782 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); - runloop_ctl(RUNLOOP_CTL_DATA_ITERATE, NULL); + runloop_iterate_data(); return ret; } diff --git a/runloop.c b/runloop.c index 29f1af10e3..11f8814660 100644 --- a/runloop.c +++ b/runloop.c @@ -566,15 +566,17 @@ static bool runloop_check_pause_state(event_cmd_state_t *cmd) return true; } +void runloop_iterate_data(void) +{ + task_queue_ctl(TASK_QUEUE_CTL_CHECK, NULL); +} + bool runloop_ctl(enum runloop_ctl_state state, void *data) { settings_t *settings = config_get_ptr(); switch (state) { - case RUNLOOP_CTL_DATA_ITERATE: - task_queue_ctl(TASK_QUEUE_CTL_CHECK, NULL); - break; case RUNLOOP_CTL_SHADER_DIR_DEINIT: shader_dir_free(&runloop_shader_dir); break; diff --git a/runloop.h b/runloop.h index 0d6d8e8005..9ab13de888 100644 --- a/runloop.h +++ b/runloop.h @@ -126,7 +126,6 @@ enum runloop_ctl_state RUNLOOP_CTL_SYSTEM_INFO_GET, RUNLOOP_CTL_SYSTEM_INFO_INIT, RUNLOOP_CTL_SYSTEM_INFO_FREE, - RUNLOOP_CTL_DATA_ITERATE, RUNLOOP_CTL_PREPARE_DUMMY }; @@ -317,6 +316,8 @@ global_t *global_get_ptr(void); **/ int runloop_iterate(unsigned *sleep_ms); +void runloop_iterate_data(void); + void runloop_msg_queue_push(const char *msg, unsigned prio, unsigned duration, bool flush); diff --git a/ui/drivers/cocoa/cocoatouch_menu.m b/ui/drivers/cocoa/cocoatouch_menu.m index f00a482dcd..f91ff1872d 100644 --- a/ui/drivers/cocoa/cocoatouch_menu.m +++ b/ui/drivers/cocoa/cocoatouch_menu.m @@ -754,8 +754,8 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath - (void)menuSelect: (uint32_t) i { - menu_entry_select(i); - runloop_ctl(RUNLOOP_CTL_DATA_ITERATE, NULL); + menu_entry_select(i); + runloop_iterate_data(); } - (void)menuBack diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index 6c88d5b81a..bce6069f9f 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -231,7 +231,7 @@ static void poll_iteration(void) ret = runloop_iterate(&sleep_ms); if (ret == 1 && sleep_ms > 0) retro_sleep(sleep_ms); - runloop_ctl(RUNLOOP_CTL_DATA_ITERATE, NULL); + runloop_iterate_data(); while(CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.002, FALSE) == kCFRunLoopRunHandledSource); } diff --git a/ui/drivers/ui_cocoatouch.m b/ui/drivers/ui_cocoatouch.m index 2c518c342e..51e06cdd5f 100644 --- a/ui/drivers/ui_cocoatouch.m +++ b/ui/drivers/ui_cocoatouch.m @@ -87,7 +87,7 @@ static void rarch_draw_observer(CFRunLoopObserverRef observer, if (ret == 1 && !ui_companion_is_on_foreground() && sleep_ms > 0) retro_sleep(sleep_ms); - runloop_ctl(RUNLOOP_CTL_DATA_ITERATE, NULL); + runloop_iterate_data(); if (ret == -1) {