[Scummvm-cvs-logs] SF.net SVN: scummvm: [29750] scummvm/trunk/backends/platform/iphone/ iphone_video.m
vinterstum at users.sourceforge.net
vinterstum at users.sourceforge.net
Fri Dec 7 21:51:54 CET 2007
Revision: 29750
http://scummvm.svn.sourceforge.net/scummvm/?rev=29750&view=rev
Author: vinterstum
Date: 2007-12-07 12:51:53 -0800 (Fri, 07 Dec 2007)
Log Message:
-----------
Properly centered the image on screen after aspect ratio correction
Modified Paths:
--------------
scummvm/trunk/backends/platform/iphone/iphone_video.m
Modified: scummvm/trunk/backends/platform/iphone/iphone_video.m
===================================================================
--- scummvm/trunk/backends/platform/iphone/iphone_video.m 2007-12-07 20:45:51 UTC (rev 29749)
+++ scummvm/trunk/backends/platform/iphone/iphone_video.m 2007-12-07 20:51:53 UTC (rev 29750)
@@ -191,17 +191,17 @@
if (ratioDifference < 1.0f) {
rectWidth = _fullWidth * ratioDifference;
rectHeight = _fullHeight;
- _widthOffset = (_fullWidth - rectWidth)/2;
+ _widthOffset = (_fullWidth - rectWidth) / 2;
_heightOffset = 0;
} else {
rectWidth = _fullWidth;
rectHeight = _fullHeight / ratioDifference;
- _heightOffset = (_fullHeight - rectHeight)/2;
+ _heightOffset = (_fullHeight - rectHeight) / 2;
_widthOffset = 0;
}
- //printf("Rect: %i, %i, %i, %i\n", _widthOffset, _heightOffset, rectWidth + _widthOffset, rectHeight + _heightOffset);
- _screenRect = CGRectMake(_widthOffset, _heightOffset, rectWidth + _widthOffset, rectHeight + _heightOffset);
+ //printf("Rect: %i, %i, %i, %i\n", _widthOffset, _heightOffset, rectWidth, rectHeight);
+ _screenRect = CGRectMake(_widthOffset, _heightOffset, rectWidth, rectHeight);
[screenLayer setFrame: _screenRect];
} else {
float ratio = (float)_height / (float)_width;
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