From f6edcbde8ee3a052f2896c875f853526df0596b0 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 20 Feb 2012 22:31:32 +0100 Subject: IPHONE: Move _overlayPortraitRatio from global scope to local scope. --- backends/platform/iphone/iphone_video.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'backends') 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; -- cgit v1.2.3