aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorMax Horn2007-12-26 23:00:18 +0000
committerMax Horn2007-12-26 23:00:18 +0000
commit9b0dc6f757ff6601d1d4b884e517221cb099a82b (patch)
treee39a43438fe4a6b998a9fbc200dbbaccc5880b6b /backends/platform
parent4aacb020a450bd037fc02207fbf59fc490b6eeb2 (diff)
downloadscummvm-rg350-9b0dc6f757ff6601d1d4b884e517221cb099a82b.tar.gz
scummvm-rg350-9b0dc6f757ff6601d1d4b884e517221cb099a82b.tar.bz2
scummvm-rg350-9b0dc6f757ff6601d1d4b884e517221cb099a82b.zip
Do not use SDL_WM_ToggleFullScreen, it's buggy on too many systems. Should fix bug #1705410.
svn-id: r30006
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/sdl/graphics.cpp24
1 files changed, 7 insertions, 17 deletions
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
}
}