aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2002-12-08 14:08:51 +0000
committerMax Horn2002-12-08 14:08:51 +0000
commit27681912884ae25c28c2e78ff33329f49f4c590b (patch)
tree8031db3aab67672792a7d0662a0273935e35489f /backends
parent6102cca2a1c0fce72ce5270bc0f9365808f8cac5 (diff)
downloadscummvm-rg350-27681912884ae25c28c2e78ff33329f49f4c590b.tar.gz
scummvm-rg350-27681912884ae25c28c2e78ff33329f49f4c590b.tar.bz2
scummvm-rg350-27681912884ae25c28c2e78ff33329f49f4c590b.zip
workaround for fullscreen toggle on OS X
svn-id: r5879
Diffstat (limited to 'backends')
-rw-r--r--backends/sdl/sdl.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp
index 70b984c910..cfb3b9d96b 100644
--- a/backends/sdl/sdl.cpp
+++ b/backends/sdl/sdl.cpp
@@ -454,11 +454,17 @@ uint32 OSystem_SDL_Normal::property(int param, Property *value) {
if (param == PROP_TOGGLE_FULLSCREEN) {
assert(_hwscreen != 0);
_full_screen ^= true;
-
+#ifdef MACOSX
+ // On OS X, SDL_WM_ToggleFullScreen is currently not implemented. Worse,
+ // it still always returns -1. So we simply don't call it at all and
+ // use hotswap_gfx_mode() directly to switch to fullscreen mode.
+ hotswap_gfx_mode();
+#else
if (!SDL_WM_ToggleFullScreen(_hwscreen)) {
// if ToggleFullScreen fails, achieve the same effect with hotswap gfx mode
hotswap_gfx_mode();
}
+#endif
return 1;
} else if (param == PROP_OVERLAY_IS_565) {
assert(_tmpscreen != 0);