[Scummvm-cvs-logs] CVS: scummvm/backends/sdl graphics.cpp,1.56,1.57

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Mon Nov 7 00:36:11 CET 2005


Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30130

Modified Files:
	graphics.cpp 
Log Message:
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.


Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/graphics.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- graphics.cpp	18 Oct 2005 01:30:15 -0000	1.56
+++ graphics.cpp	7 Nov 2005 08:35:50 -0000	1.57
@@ -297,9 +297,6 @@
 	_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 @@
 	_forceFull = true;
 	_modeFlags |= DF_UPDATE_EXPAND_1_PIXEL;
 
+	if (_screenHeight != 200)
+		_adjustAspectRatio = false;
+
 	//
 	// Create the surface that contains the 8 bit game data
 	//





More information about the Scummvm-git-logs mailing list