aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl/graphics.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-11-07 08:35:50 +0000
committerTorbjörn Andersson2005-11-07 08:35:50 +0000
commit1c6575b824881ca0ffed4ce9573ad22994fa8379 (patch)
treef731edba682b476173a70a28c1ba053cc7e2ccec /backends/sdl/graphics.cpp
parente96d1535138d72880d945730517ce2bff8235558 (diff)
downloadscummvm-rg350-1c6575b824881ca0ffed4ce9573ad22994fa8379.tar.gz
scummvm-rg350-1c6575b824881ca0ffed4ce9573ad22994fa8379.tar.bz2
scummvm-rg350-1c6575b824881ca0ffed4ce9573ad22994fa8379.zip
Moved aspect ratio disabling (if screen height != 200) from initSize() to
loadGfxMode(). As reported on the forum, setting aspect ratio correction in a 640x480 game would cause ScummVM to crash when the game is started from the launcher. With all the graphics transactions and stuff, it's a bit hard to follow what's going to happen, but I hope deferring this check until the last moment (i.e. just before the graphics surfaces are actually created) is the correct bugfix. svn-id: r19491
Diffstat (limited to 'backends/sdl/graphics.cpp')
-rw-r--r--backends/sdl/graphics.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp
index 66b3214ea4..7215f12a81 100644
--- a/backends/sdl/graphics.cpp
+++ b/backends/sdl/graphics.cpp
@@ -297,9 +297,6 @@ void OSystem_SDL::initSize(uint w, uint h, int overlayScale) {
_screenWidth = w;
_screenHeight = h;
- if (h != 200)
- _adjustAspectRatio = false;
-
if (overlayScale != -1) {
_overlayScale = overlayScale;
if (w != 320 && w != 256) // 256 is for MM NES
@@ -339,6 +336,9 @@ void OSystem_SDL::loadGFXMode() {
_forceFull = true;
_modeFlags |= DF_UPDATE_EXPAND_1_PIXEL;
+ if (_screenHeight != 200)
+ _adjustAspectRatio = false;
+
//
// Create the surface that contains the 8 bit game data
//