From cc8a6cc993b8f6215cb80afa07278b3e5ab5d88f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 20 Feb 2012 22:21:20 +0100 Subject: [PATCH] IPHONE: Add _overlayRect, which describes the overlay screen rect. --- backends/platform/iphone/iphone_video.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m index d5002ff3d27..f60d7de12d1 100644 --- a/backends/platform/iphone/iphone_video.m +++ b/backends/platform/iphone/iphone_video.m @@ -40,6 +40,7 @@ static int _overlayTexWidth = 0; static int _overlayTexHeight = 0; static int _overlayWidth = 0; static int _overlayHeight = 0; +static CGRect _overlayRect; static float _overlayPortraitRatio = 1.0f; static int _needsScreenUpdate = 0; @@ -628,9 +629,11 @@ static void setFilterModeForTexture(GLuint tex, GraphicsModes mode) { [self addSubview:[_keyboardView inputView]]; [self addSubview: _keyboardView]; [[_keyboardView inputView] becomeFirstResponder]; - _overlayPortraitRatio = (_overlayHeight * ratio) / _overlayWidth; + overlayPortraitRatio = (_overlayHeight * ratio) / _overlayWidth; } + _overlayRect = CGRectMake(0, 0, _renderBufferWidth, _renderBufferHeight * overlayPortraitRatio); + _gameScreenVertCoords[0] = _heightOffset; _gameScreenVertCoords[1] = _widthOffset; _gameScreenVertCoords[2] = _visibleWidth - _heightOffset;