[Scummvm-cvs-logs] SF.net SVN: scummvm: [23743] scummvm/branches/branch-0-9-0/backends/wince/wince-sdl.cpp

knakos at users.sourceforge.net knakos at users.sourceforge.net
Fri Aug 25 08:23:15 CEST 2006


Revision: 23743
Author:   knakos
Date:     2006-08-24 23:23:09 -0700 (Thu, 24 Aug 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=23743&view=rev

Log Message:
-----------
fix update rect when adjusting ratio (why don't users report these things?)

Modified Paths:
--------------
    scummvm/branches/branch-0-9-0/backends/wince/wince-sdl.cpp
Modified: scummvm/branches/branch-0-9-0/backends/wince/wince-sdl.cpp
===================================================================
--- scummvm/branches/branch-0-9-0/backends/wince/wince-sdl.cpp	2006-08-23 21:13:11 UTC (rev 23742)
+++ scummvm/branches/branch-0-9-0/backends/wince/wince-sdl.cpp	2006-08-25 06:23:09 UTC (rev 23743)
@@ -894,6 +894,8 @@
 	if (_mode != GFX_NORMAL)
 		return false;
 
+	_adjustAspectRatio = false;
+
 	if (CEDevice::hasPocketPCResolution()) {
 		if (!_orientationLandscape && (_screenWidth == 320 || !_screenWidth)) {
 			_scaleFactorXm = 3;
@@ -912,6 +914,7 @@
 				_scaleFactorYd = 5;
 				_scalerProc = PocketPCLandscapeAspect;
 				_modeFlags = 0;
+				_adjustAspectRatio = true;
 			} else {
 				_scaleFactorXm = 1;
 				_scaleFactorXd = 1;
@@ -1443,8 +1446,7 @@
 					dst_y /= _scaleFactorYd;
 
 					if (_adjustAspectRatio) {
-						orig_dst_y = dst_y;
-						dst_y = real2Aspect(dst_y);
+						dst_h = real2Aspect(dst_h);
 					}
 
 					// clip inside platform screen (landscape,bottom only)
@@ -1467,11 +1469,10 @@
 				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);
@@ -1830,7 +1831,7 @@
 	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;


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