From 9b0dc6f757ff6601d1d4b884e517221cb099a82b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 26 Dec 2007 23:00:18 +0000 Subject: Do not use SDL_WM_ToggleFullScreen, it's buggy on too many systems. Should fix bug #1705410. svn-id: r30006 --- backends/platform/sdl/graphics.cpp | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index 721a5883a1..b3e5a0cd65 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -704,24 +704,14 @@ void OSystem_SDL::setFullscreenMode(bool enable) { return; } -#if (defined(MACOSX) && !SDL_VERSION_ATLEAST(1, 2, 6)) || defined(__MAEMO__) - // On OS X, SDL_WM_ToggleFullScreen is currently not implemented. Worse, - // before SDL 1.2.6 it always returned -1 (which would indicate a - // successful switch). So we simply don't call it at all and use - // hotswapGFXMode() directly to switch to fullscreen mode. + // 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 + // the MAEMO platform, it seems to have caused problems, too. + // And on Linux, there were some troubles, too (see bug #1705410). + // So, we just do it "manually" now. There shouldn't be any drawbacks to that + // anyway. hotswapGFXMode(); -#else - if (!SDL_WM_ToggleFullScreen(_hwscreen)) { - // if ToggleFullScreen fails, achieve the same effect with hotswap gfx mode - hotswapGFXMode(); - } else { - // Blit everything to the screen - internUpdateScreen(); - - // Make sure that an Common::EVENT_SCREEN_CHANGED gets sent later - _modeChanged = true; - } -#endif } } -- cgit v1.2.3