diff --git a/frontend/frontend.c b/frontend/frontend.c index 900aad9afa..51effd5f18 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -102,13 +102,7 @@ static int main_entry_iterate_shutdown(args_type() args) static int main_entry_iterate_content(args_type() args) { - bool r; - if (g_extern.is_paused && !g_extern.is_oneshot) - r = rarch_main_idle_iterate(); - else - r = rarch_main_iterate(); - - if (r) + if (rarch_main_iterate()) { if (driver.frontend_ctx && driver.frontend_ctx->process_events) driver.frontend_ctx->process_events(args); @@ -388,7 +382,7 @@ returntype main_entry(signature()) #if defined(HAVE_MENU) while (!main_entry_iterate(signature_expand(), args)); #else - while ((g_extern.is_paused && !g_extern.is_oneshot) ? rarch_main_idle_iterate() : rarch_main_iterate()); + while (rarch_main_iterate()); #endif main_exit(args); diff --git a/general.h b/general.h index 47b738db18..e8c2103df8 100644 --- a/general.h +++ b/general.h @@ -770,7 +770,6 @@ int rarch_main(int argc, char *argv[]); void rarch_main_init_wrap(const struct rarch_main_wrap *args, int *argc, char **argv); int rarch_main_init(int argc, char *argv[]); -bool rarch_main_idle_iterate(void); void rarch_main_command(unsigned action); bool rarch_main_iterate(void); void rarch_main_deinit(void); diff --git a/retroarch.c b/retroarch.c index 65903530ef..b5f6368fbb 100644 --- a/retroarch.c +++ b/retroarch.c @@ -3159,6 +3159,13 @@ bool rarch_main_iterate(void) // Checks for stuff like fullscreen, save states, etc. do_state_checks(); + if (g_extern.is_paused && !g_extern.is_oneshot) + { + rarch_input_poll(); + rarch_sleep(10); + return true; + } + // Run libretro for one frame. #if defined(HAVE_THREADS) lock_autosave(); @@ -3352,14 +3359,3 @@ void rarch_main_init_wrap(const struct rarch_main_wrap *args, int *argc, char ** RARCH_LOG("arg #%d: %s\n", i, argv[i]); #endif } - -bool rarch_main_idle_iterate(void) -{ - if (input_key_pressed_func(RARCH_QUIT_KEY) || !video_alive_func()) - return false; - - do_state_checks(); - rarch_input_poll(); - rarch_sleep(10); - return true; -}