[Scummvm-cvs-logs] SF.net SVN: scummvm:[53447] scummvm/trunk/engines/sword25/gfx/bitmap.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Wed Oct 13 22:05:21 CEST 2010


Revision: 53447
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53447&view=rev
Author:   eriktorbjorn
Date:     2010-10-13 20:05:21 +0000 (Wed, 13 Oct 2010)

Log Message:
-----------
SWORD25: Worked around crash in options dialog.

I don't really know if this is correct, but aesthetically it goes well
with how the scale factor is treated.

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/gfx/bitmap.cpp

Modified: scummvm/trunk/engines/sword25/gfx/bitmap.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/bitmap.cpp	2010-10-13 20:04:50 UTC (rev 53446)
+++ scummvm/trunk/engines/sword25/gfx/bitmap.cpp	2010-10-13 20:05:21 UTC (rev 53447)
@@ -134,6 +134,8 @@
 		_width = static_cast<int>(_originalWidth * _scaleFactorX);
 		if (_scaleFactorX <= 0.0f)
 			_scaleFactorX = 0.001f;
+		if (_width <= 0)
+			_width = 1;
 		forceRefresh();
 	}
 }
@@ -156,6 +158,8 @@
 		_height = static_cast<int>(_originalHeight * scaleFactorY);
 		if (_scaleFactorY <= 0.0f)
 			_scaleFactorY = 0.001f;
+		if (_height <= 0)
+			_height = 1;
 		forceRefresh();
 	}
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list