Fix fullscreen state flickering with XVideo.

This commit is contained in:
Themaister 2011-04-09 13:15:14 +02:00
parent f0bbeb901d
commit 0f0a4d0a5e

View File

@ -953,13 +953,17 @@ static void check_savestates(void)
static void check_fullscreen(void)
{
static bool was_pressed = false;
bool pressed;
// If we go fullscreen we drop all drivers and reinit to be safe.
if (driver.input->key_pressed(driver.input_data, SSNES_FULLSCREEN_TOGGLE_KEY))
if ((pressed = driver.input->key_pressed(driver.input_data, SSNES_FULLSCREEN_TOGGLE_KEY)) && !was_pressed)
{
g_settings.video.fullscreen = !g_settings.video.fullscreen;
uninit_drivers();
init_drivers();
}
was_pressed = pressed;
}
static void check_stateslots(void)