aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2004-12-06 21:12:52 +0000
committerMax Horn2004-12-06 21:12:52 +0000
commit954e16abbf8de9b37d124f0725f943c662994f95 (patch)
tree0b968a0735a3424fb8bfedbc09d1221e241db695
parent3fb09f9b1c36bba22b3248b37a04eb8a311d4ba0 (diff)
downloadscummvm-rg350-954e16abbf8de9b37d124f0725f943c662994f95.tar.gz
scummvm-rg350-954e16abbf8de9b37d124f0725f943c662994f95.tar.bz2
scummvm-rg350-954e16abbf8de9b37d124f0725f943c662994f95.zip
Fix for bug #1074931 (GUI: Starting games in fullscreen doesn't work), avoid one unneccessary redraw
svn-id: r15997
-rw-r--r--backends/sdl/graphics.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp
index 8053f08c01..3593a1365f 100644
--- a/backends/sdl/graphics.cpp
+++ b/backends/sdl/graphics.cpp
@@ -560,9 +560,9 @@ void OSystem_SDL::setFullscreenMode(bool enable) {
if (_fullscreen != enable) {
assert(_hwscreen != 0);
_fullscreen ^= true;
-
+
undrawMouse();
-
+
#if defined(MACOSX) && !SDL_VERSION_ATLEAST(1, 2, 6)
// On OS X, SDL_WM_ToggleFullScreen is currently not implemented. Worse,
// before SDL 1.2.6 it always returned -1 (which would indicate a
@@ -573,14 +573,14 @@ void OSystem_SDL::setFullscreenMode(bool enable) {
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 EVENT_SCREEN_CHANGED gets sent later
+ _modeChanged = true;
}
#endif
-
- // Blit everything to the screen
- internUpdateScreen();
-
- // Make sure that an EVENT_SCREEN_CHANGED gets sent later
- _modeChanged = true;
}
}
@@ -1147,7 +1147,7 @@ void OSystem_SDL::drawMouse() {
}
void OSystem_SDL::undrawMouse() {
- assert (_transactionMode == kTransactionNone);
+ assert (_transactionMode == kTransactionNone || _transactionMode == kTransactionCommit);
if (!_mouseDrawn)
return;