aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostas Nakos2007-05-01 15:19:11 +0000
committerKostas Nakos2007-05-01 15:19:11 +0000
commitd520bdfcb8f70e8fd4448ea404d9e5fa993f23ca (patch)
tree02f62bc6edf88f832be0b4d28de483cc38d06dc8
parent71a2910a81fba9812c6f894683a3be6144b043d5 (diff)
downloadscummvm-rg350-d520bdfcb8f70e8fd4448ea404d9e5fa993f23ca.tar.gz
scummvm-rg350-d520bdfcb8f70e8fd4448ea404d9e5fa993f23ca.tar.bz2
scummvm-rg350-d520bdfcb8f70e8fd4448ea404d9e5fa993f23ca.zip
fix scaler selection for square (non vga) devices
svn-id: r26718
-rw-r--r--backends/platform/wince/CEDevice.cpp4
-rw-r--r--backends/platform/wince/CEDevice.h1
-rw-r--r--backends/platform/wince/wince-sdl.cpp13
3 files changed, 11 insertions, 7 deletions
diff --git a/backends/platform/wince/CEDevice.cpp b/backends/platform/wince/CEDevice.cpp
index 9562dff5a9..e789c5edb6 100644
--- a/backends/platform/wince/CEDevice.cpp
+++ b/backends/platform/wince/CEDevice.cpp
@@ -73,6 +73,10 @@ void CEDevice::wakeUp() {
}
}
+bool CEDevice::hasSquareQVGAResolution() {
+ return (OSystem_WINCE3::getScreenWidth() == 240 && OSystem_WINCE3::getScreenWidth() == 240);
+}
+
bool CEDevice::hasPocketPCResolution() {
if (OSystem_WINCE3::isOzone() && hasWideResolution())
return true;
diff --git a/backends/platform/wince/CEDevice.h b/backends/platform/wince/CEDevice.h
index 7220b259d3..56de506ed1 100644
--- a/backends/platform/wince/CEDevice.h
+++ b/backends/platform/wince/CEDevice.h
@@ -34,6 +34,7 @@ class CEDevice {
static void end();
static void wakeUp();
static bool hasPocketPCResolution();
+ static bool hasSquareQVGAResolution();
static bool hasDesktopResolution();
static bool hasWideResolution();
static bool hasSmartphoneResolution();
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index fda76eae17..1d9d000dd8 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -982,15 +982,15 @@ bool OSystem_WINCE3::update_scalers() {
_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 @@ bool OSystem_WINCE3::update_scalers() {
_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 @@ bool OSystem_WINCE3::update_scalers() {
return true;
}
+
if (CEDevice::hasSmartphoneResolution()) {
if (_screenWidth > 320)
error("Game resolution not supported on Smartphone");