aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform')
-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;