From ee980142f5f06dba1e9c8a368b4b2cc6b480b4c3 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Thu, 31 Mar 2011 00:26:22 +0000 Subject: [PATCH] sdl: pause before switching to fullscreen; resume when switch is complete --- src/drivers/sdl/sdl-video.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/drivers/sdl/sdl-video.cpp b/src/drivers/sdl/sdl-video.cpp index 8ec17dfc..88e22b4d 100644 --- a/src/drivers/sdl/sdl-video.cpp +++ b/src/drivers/sdl/sdl-video.cpp @@ -494,6 +494,11 @@ InitVideo(FCEUGI *gi) void ToggleFS() { + // pause while we we are making the switch + bool paused = FCEUI_EmulationPaused(); + if(!paused) + FCEUI_ToggleEmulationPause(); + int error, fullscreen = s_fullscreen; // shut down the current video system @@ -514,6 +519,9 @@ ToggleFS() g_config->setOption("SDL.Fullscreen", fullscreen); InitVideo(GameInfo); } + // if we paused to make the switch; unpause + if(!paused) + FCEUI_ToggleEmulationPause(); } static SDL_Color s_psdl[256];