aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorKostas Nakos2006-08-25 06:30:18 +0000
committerKostas Nakos2006-08-25 06:30:18 +0000
commit11f1123c0208a313d8078c966c75a0a5ec7e2924 (patch)
tree5ef344d260d6aa40eb3afabc5e92939b80ae2d8a /backends
parent4f9576e033afe20b8de37cff761dd9b08286e63e (diff)
downloadscummvm-rg350-11f1123c0208a313d8078c966c75a0a5ec7e2924.tar.gz
scummvm-rg350-11f1123c0208a313d8078c966c75a0a5ec7e2924.tar.bz2
scummvm-rg350-11f1123c0208a313d8078c966c75a0a5ec7e2924.zip
fix update rect when adjusting ratio (backport)
svn-id: r23744
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/wince/wince-sdl.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 27894f2e1e..a5e08243bd 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -893,6 +893,8 @@ bool OSystem_WINCE3::update_scalers() {
if (_mode != GFX_NORMAL)
return false;
+ _adjustAspectRatio = false;
+
if (CEDevice::hasPocketPCResolution()) {
if (!_orientationLandscape && (_screenWidth == 320 || !_screenWidth)) {
_scaleFactorXm = 3;
@@ -911,6 +913,7 @@ bool OSystem_WINCE3::update_scalers() {
_scaleFactorYd = 5;
_scalerProc = PocketPCLandscapeAspect;
_modeFlags = 0;
+ _adjustAspectRatio = true;
} else {
_scaleFactorXm = 1;
_scaleFactorXd = 1;
@@ -1440,10 +1443,8 @@ void OSystem_WINCE3::internUpdateScreen() {
dst_y *= _scaleFactorYm;
dst_y /= _scaleFactorYd;
- if (_adjustAspectRatio) {
- orig_dst_y = dst_y;
- dst_y = real2Aspect(dst_y);
- }
+ if (_adjustAspectRatio)
+ dst_h = real2Aspect(dst_h);
// clip inside platform screen (landscape,bottom only)
if (_orientationLandscape && !_zoomDown && dst_y+dst_h > _screenHeight)
@@ -1465,11 +1466,10 @@ void OSystem_WINCE3::internUpdateScreen() {
else
r->y = dst_y - 240;
r->w = r->w * _scaleFactorXm / _scaleFactorXd;
- r->h = dst_h * _scaleFactorYm / _scaleFactorYd;
-
- /*if (_adjustAspectRatio && orig_dst_y / _scaleFactor < _screenHeight)
- r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y);
- */
+ if (!_adjustAspectRatio)
+ r->h = dst_h * _scaleFactorYm / _scaleFactorYd;
+ else
+ r->h = dst_h;
}
SDL_UnlockSurface(srcSurf);
SDL_UnlockSurface(_hwscreen);
@@ -1828,7 +1828,7 @@ void OSystem_WINCE3::undrawMouse() {
int old_mouse_w = _mouseCurState.w;
int old_mouse_h = _mouseCurState.h;
- // clip the mouse rect, and addjust the src pointer accordingly
+ // clip the mouse rect, and adjust the src pointer accordingly
if (old_mouse_x < 0) {
old_mouse_w += old_mouse_x;
old_mouse_x = 0;