aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOystein Eftevaag2007-12-07 20:51:53 +0000
committerOystein Eftevaag2007-12-07 20:51:53 +0000
commit0718e41c82144d0a617b5a1ec254c34c8a9bf13d (patch)
tree597e878e47d8f635fb64d531c67e5ed27eae25ad
parent126f55fd0ec2cea7e8a397c4ba810d4c562ce3ae (diff)
downloadscummvm-rg350-0718e41c82144d0a617b5a1ec254c34c8a9bf13d.tar.gz
scummvm-rg350-0718e41c82144d0a617b5a1ec254c34c8a9bf13d.tar.bz2
scummvm-rg350-0718e41c82144d0a617b5a1ec254c34c8a9bf13d.zip
Properly centered the image on screen after aspect ratio correction
svn-id: r29750
-rw-r--r--backends/platform/iphone/iphone_video.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m
index 7401cd0ff1..6e66b829a6 100644
--- a/backends/platform/iphone/iphone_video.m
+++ b/backends/platform/iphone/iphone_video.m
@@ -191,17 +191,17 @@ bool getLocalMouseCoords(CGPoint *point) {
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;