[Scummvm-cvs-logs] SF.net SVN: scummvm: [26718] scummvm/trunk/backends/platform/wince

knakos at users.sourceforge.net knakos at users.sourceforge.net
Tue May 1 17:19:12 CEST 2007


Revision: 26718
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26718&view=rev
Author:   knakos
Date:     2007-05-01 08:19:11 -0700 (Tue, 01 May 2007)

Log Message:
-----------
fix scaler selection for square (non vga) devices

Modified Paths:
--------------
    scummvm/trunk/backends/platform/wince/CEDevice.cpp
    scummvm/trunk/backends/platform/wince/CEDevice.h
    scummvm/trunk/backends/platform/wince/wince-sdl.cpp

Modified: scummvm/trunk/backends/platform/wince/CEDevice.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEDevice.cpp	2007-05-01 14:52:28 UTC (rev 26717)
+++ scummvm/trunk/backends/platform/wince/CEDevice.cpp	2007-05-01 15:19:11 UTC (rev 26718)
@@ -73,6 +73,10 @@
 	}
 }
 
+bool CEDevice::hasSquareQVGAResolution() {
+	return (OSystem_WINCE3::getScreenWidth() == 240 && OSystem_WINCE3::getScreenWidth() == 240);
+}
+
 bool CEDevice::hasPocketPCResolution() {
 	if (OSystem_WINCE3::isOzone() && hasWideResolution())
 		return true;

Modified: scummvm/trunk/backends/platform/wince/CEDevice.h
===================================================================
--- scummvm/trunk/backends/platform/wince/CEDevice.h	2007-05-01 14:52:28 UTC (rev 26717)
+++ scummvm/trunk/backends/platform/wince/CEDevice.h	2007-05-01 15:19:11 UTC (rev 26718)
@@ -34,6 +34,7 @@
 		static void end();
 		static void wakeUp();
 		static bool hasPocketPCResolution();
+		static bool hasSquareQVGAResolution();
 		static bool hasDesktopResolution();
 		static bool hasWideResolution();
 		static bool hasSmartphoneResolution();

Modified: scummvm/trunk/backends/platform/wince/wince-sdl.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/wince-sdl.cpp	2007-05-01 14:52:28 UTC (rev 26717)
+++ scummvm/trunk/backends/platform/wince/wince-sdl.cpp	2007-05-01 15:19:11 UTC (rev 26718)
@@ -982,15 +982,15 @@
 	_adjustAspectRatio = false;
 
 	if (CEDevice::hasPocketPCResolution()) {
-		if (!_orientationLandscape && (_screenWidth == 320 || !_screenWidth)) {
+		if ( 	(!_orientationLandscape && (_screenWidth == 320 || !_screenWidth)) 
+			|| CEDevice::hasSquareQVGAResolution() ) {
 			_scaleFactorXm = 3;
 			_scaleFactorXd = 4;
 			_scaleFactorYm = 1;
 			_scaleFactorYd = 1;
 			_scalerProc = PocketPCPortrait;
 			_modeFlags = 0;
-		}
-		if ( _orientationLandscape && (_screenWidth == 320 || !_screenWidth)) {
+		} else if ( _orientationLandscape && (_screenWidth == 320 || !_screenWidth)) {
 			Common::String gameid(ConfMan.get("gameid"));	// consider removing this check and start honoring the _adjustAspectRatio flag
 			if (!_panelVisible && !_hasSmartphoneResolution  && !_overlayVisible && !(strncmp(gameid.c_str(), "zak", 3) == 0)) {
 				_scaleFactorXm = 1;
@@ -1008,16 +1008,14 @@
 				_scalerProc = Normal1x;
 				_modeFlags = 0;
 			}
-		}
-		if (_screenWidth == 640 && !(isOzone() && (getScreenWidth() >= 640 || getScreenHeight() >= 640))) {
+		} else 	if (_screenWidth == 640 && !(isOzone() && (getScreenWidth() >= 640 || getScreenHeight() >= 640))) {
 			_scaleFactorXm = 1;
 			_scaleFactorXd = 2;
 			_scaleFactorYm = 1;
 			_scaleFactorYd = 2;
 			_scalerProc = PocketPCHalf;
 			_modeFlags = 0;
-		}
-		if (_screenWidth == 640 && (isOzone() && (getScreenWidth() >= 640 || getScreenHeight() >= 640))) {
+		} else 	if (_screenWidth == 640 && (isOzone() && (getScreenWidth() >= 640 || getScreenHeight() >= 640))) {
 			_scaleFactorXm = 1;
 			_scaleFactorXd = 1;
 			_scaleFactorYm = 1;
@@ -1028,6 +1026,7 @@
 
 		return true;
 	}
+
 	if (CEDevice::hasSmartphoneResolution()) {
 		if (_screenWidth > 320)
 			error("Game resolution not supported on Smartphone");


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