diff --git a/runloop.c b/runloop.c index 92e5c27fdd..ed2d7c4fa5 100644 --- a/runloop.c +++ b/runloop.c @@ -973,7 +973,6 @@ int rarch_main_iterate(unsigned *sleep_ms) static retro_time_t frame_limit_last_time = 0.0; static retro_input_t last_input = 0; bool menu_toggled = false; - bool fullscreen_toggled = false; driver_t *driver = driver_get_ptr(); settings_t *settings = config_get_ptr(); global_t *global = global_get_ptr(); @@ -1045,13 +1044,16 @@ int rarch_main_iterate(unsigned *sleep_ms) if (cmd.overlay_next_pressed) event_command(EVENT_CMD_OVERLAY_NEXT); - fullscreen_toggled = !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL); + if (cmd.fullscreen_toggle) + { + bool fullscreen_toggled = !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL); #ifdef HAVE_MENU - fullscreen_toggled = fullscreen_toggled || menu_driver_alive(); + fullscreen_toggled = fullscreen_toggled || menu_driver_alive(); #endif - if (fullscreen_toggled && cmd.fullscreen_toggle) - event_command(EVENT_CMD_FULLSCREEN_TOGGLE); + if (fullscreen_toggled) + event_command(EVENT_CMD_FULLSCREEN_TOGGLE); + } if (cmd.grab_mouse_pressed) event_command(EVENT_CMD_GRAB_MOUSE_TOGGLE);