aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/iphone
diff options
context:
space:
mode:
authorJohannes Schickel2012-02-20 22:31:32 +0100
committerJohannes Schickel2012-02-21 18:54:26 +0100
commitf6edcbde8ee3a052f2896c875f853526df0596b0 (patch)
treeeef09f61d5adc7e6c457a069e5dd36c602fbe296 /backends/platform/iphone
parentcc8a6cc993b8f6215cb80afa07278b3e5ab5d88f (diff)
downloadscummvm-rg350-f6edcbde8ee3a052f2896c875f853526df0596b0.tar.gz
scummvm-rg350-f6edcbde8ee3a052f2896c875f853526df0596b0.tar.bz2
scummvm-rg350-f6edcbde8ee3a052f2896c875f853526df0596b0.zip
IPHONE: Move _overlayPortraitRatio from global scope to local scope.
Diffstat (limited to 'backends/platform/iphone')
-rw-r--r--backends/platform/iphone/iphone_video.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m
index f60d7de12d..f7b8edd7b9 100644
--- a/backends/platform/iphone/iphone_video.m
+++ b/backends/platform/iphone/iphone_video.m
@@ -41,7 +41,6 @@ static int _overlayTexHeight = 0;
static int _overlayWidth = 0;
static int _overlayHeight = 0;
static CGRect _overlayRect;
-static float _overlayPortraitRatio = 1.0f;
static int _needsScreenUpdate = 0;
static int _overlayIsEnabled = 0;
@@ -588,6 +587,8 @@ static void setFilterModeForTexture(GLuint tex, GraphicsModes mode) {
[[_keyboardView inputView] removeFromSuperview];
}
+ float overlayPortraitRatio;
+
if (_orientation == UIDeviceOrientationLandscapeLeft || _orientation == UIDeviceOrientationLandscapeRight) {
_visibleHeight = _renderBufferHeight;
_visibleWidth = _renderBufferWidth;
@@ -608,7 +609,7 @@ static void setFilterModeForTexture(GLuint tex, GraphicsModes mode) {
//printf("Rect: %i, %i, %i, %i\n", _widthOffset, _heightOffset, rectWidth, rectHeight);
_gameScreenRect = CGRectMake(_widthOffset, _heightOffset, rectWidth, rectHeight);
- _overlayPortraitRatio = 1.0f;
+ overlayPortraitRatio = 1.0f;
} else {
float ratio = (float)_height / (float)_width;
int height = _renderBufferWidth * ratio;