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

sev at users.sourceforge.net sev at users.sourceforge.net
Mon Nov 13 14:53:52 CET 2006


Revision: 24706
          http://svn.sourceforge.net/scummvm/?rev=24706&view=rev
Author:   sev
Date:     2006-11-13 05:53:14 -0800 (Mon, 13 Nov 2006)

Log Message:
-----------
Implement FR #1595534: "Touche: Aspect Ratio Correction"

Modified Paths:
--------------
    scummvm/trunk/backends/platform/sdl/graphics.cpp
    scummvm/trunk/backends/platform/sdl/sdl-common.h

Modified: scummvm/trunk/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/graphics.cpp	2006-11-13 12:03:08 UTC (rev 24705)
+++ scummvm/trunk/backends/platform/sdl/graphics.cpp	2006-11-13 13:53:14 UTC (rev 24706)
@@ -316,7 +316,7 @@
 	_overlayWidth = _screenWidth * _scaleFactor;
 	_overlayHeight = _screenHeight * _scaleFactor;
 
-	if (_screenHeight != 200)
+	if (_screenHeight != 200 && _screenHeight != 400)
 		_adjustAspectRatio = false;
 
 	if (_adjustAspectRatio)
@@ -735,7 +735,7 @@
 }
 
 void OSystem_SDL::setAspectRatioCorrection(bool enable) {
-	if ((_screenHeight == 200 && _adjustAspectRatio != enable) ||
+	if (((_screenHeight == 200 || _screenHeight == 400) && _adjustAspectRatio != enable) ||
 		_transactionMode == kTransactionCommit) {
 		Common::StackLock lock(_graphicsMutex);
 

Modified: scummvm/trunk/backends/platform/sdl/sdl-common.h
===================================================================
--- scummvm/trunk/backends/platform/sdl/sdl-common.h	2006-11-13 12:03:08 UTC (rev 24705)
+++ scummvm/trunk/backends/platform/sdl/sdl-common.h	2006-11-13 13:53:14 UTC (rev 24706)
@@ -399,7 +399,10 @@
 
 	virtual bool saveScreenshot(const char *filename); // overloaded by CE backend
 
-	int effectiveScreenHeight() const { return (_adjustAspectRatio ? 240 : _screenHeight) * _scaleFactor; }
+	int effectiveScreenHeight() const {
+		return (_adjustAspectRatio ? real2Aspect(_screenHeight) : _screenHeight) 
+			* _scaleFactor; 
+	}
 
 	void setupIcon();
 	void handleKbdMouse();


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