From 383014f330639da5bddfd6ba94a2974d6d286196 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 20 Sep 2008 16:10:29 +0000 Subject: Fix for bug #2120602: 5ALL: Starting the launcher with -f triggers assertion svn-id: r34617 --- backends/platform/sdl/graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform/sdl/graphics.cpp') diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index 4a5c143712..030ba07ec6 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -692,7 +692,7 @@ bool OSystem_SDL::saveScreenshot(const char *filename) { void OSystem_SDL::setFullscreenMode(bool enable) { Common::StackLock lock(_graphicsMutex); - if (_fullscreen != enable || _transactionMode == kTransactionCommit) { + if (_fullscreen != enable && _transactionMode == kTransactionCommit) { assert(_hwscreen != 0); _fullscreen = enable; -- cgit v1.2.3 From f8574c52f8ae48799241a8fb4e88d000b86efd65 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 22 Sep 2008 17:33:30 +0000 Subject: Fixed full screen toggling via alt+enter. svn-id: r34627 --- backends/platform/sdl/graphics.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'backends/platform/sdl/graphics.cpp') diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index 030ba07ec6..96b74ecba7 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -691,20 +691,14 @@ bool OSystem_SDL::saveScreenshot(const char *filename) { void OSystem_SDL::setFullscreenMode(bool enable) { Common::StackLock lock(_graphicsMutex); + + if (_fullscreen == enable) + return; - if (_fullscreen != enable && _transactionMode == kTransactionCommit) { + if (_transactionMode == kTransactionCommit) { assert(_hwscreen != 0); _fullscreen = enable; - if (_transactionMode == kTransactionActive) { - _transactionDetails.fs = enable; - _transactionDetails.fsChanged = true; - - _transactionDetails.needHotswap = true; - - return; - } - // Switch between fullscreen and windowed mode by invoking hotswapGFXMode(). // We used to use SDL_WM_ToggleFullScreen() in the past, but this caused various // problems. E.g. on OS X, it was implemented incorrectly for a long time; on @@ -713,6 +707,11 @@ void OSystem_SDL::setFullscreenMode(bool enable) { // So, we just do it "manually" now. There shouldn't be any drawbacks to that // anyway. hotswapGFXMode(); + } else if (_transactionMode == kTransactionActive) { + _transactionDetails.fs = enable; + _transactionDetails.fsChanged = true; + + _transactionDetails.needHotswap = true; } } -- cgit v1.2.3