Reimplement fullscreen toggle

This commit is contained in:
twinaphex 2015-12-04 11:21:06 +01:00
parent 50f3999e9b
commit 56a26e9014

View File

@ -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);