diff options
author | Johannes Schickel | 2012-02-20 18:36:23 +0100 |
---|---|---|
committer | Johannes Schickel | 2012-02-20 18:39:57 +0100 |
commit | 7957cc956e8bf66bd6f7a588d70150de70ef8917 (patch) | |
tree | 5748739571a6b07062b0ec715388022a83f32d06 /backends/platform/iphone | |
parent | d91268c4c1e3e0b830e97d144a0548d9d7929bb8 (diff) | |
download | scummvm-rg350-7957cc956e8bf66bd6f7a588d70150de70ef8917.tar.gz scummvm-rg350-7957cc956e8bf66bd6f7a588d70150de70ef8917.tar.bz2 scummvm-rg350-7957cc956e8bf66bd6f7a588d70150de70ef8917.zip |
IPHONE: Use render buffer size instead of application frame size for video size calculations.
These match as far as I can tell, but in case they don't match, the render
buffer size should be the correct thing to use.
Diffstat (limited to 'backends/platform/iphone')
-rw-r--r-- | backends/platform/iphone/iphone_video.m | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m index 49c66a6a7d..a27234bc41 100644 --- a/backends/platform/iphone/iphone_video.m +++ b/backends/platform/iphone/iphone_video.m @@ -584,17 +584,17 @@ static void setFilterModeForTexture(GLuint tex, GraphicsModes mode) { _visibleHeight = _renderBufferHeight; _visibleWidth = _renderBufferWidth; - float ratioDifference = ((float)_height / (float)_width) / ((float)_fullWidth / (float)_fullHeight); + float ratioDifference = ((float)_height / (float)_width) / ((float)_renderBufferWidth / (float)_renderBufferHeight); int rectWidth, rectHeight; if (ratioDifference < 1.0f) { - rectWidth = _fullWidth * ratioDifference; - rectHeight = _fullHeight; - _widthOffset = (_fullWidth - rectWidth) / 2; + rectWidth = _renderBufferWidth * ratioDifference; + rectHeight = _renderBufferHeight; + _widthOffset = (_renderBufferWidth - rectWidth) / 2; _heightOffset = 0; } else { - rectWidth = _fullWidth; - rectHeight = _fullHeight / ratioDifference; - _heightOffset = (_fullHeight - rectHeight) / 2; + rectWidth = _renderBufferWidth; + rectHeight = _renderBufferHeight / ratioDifference; + _heightOffset = (_renderBufferHeight - rectHeight) / 2; _widthOffset = 0; } @@ -603,9 +603,9 @@ static void setFilterModeForTexture(GLuint tex, GraphicsModes mode) { _overlayPortraitRatio = 1.0f; } else { float ratio = (float)_height / (float)_width; - int height = _fullWidth * ratio; - //printf("Making rect (%u, %u)\n", _fullWidth, height); - _gameScreenRect = CGRectMake(0, 0, _fullWidth - 1, height - 1); + int height = _renderBufferWidth * ratio; + //printf("Making rect (%u, %u)\n", _renderBufferWidth, height); + _gameScreenRect = CGRectMake(0, 0, _renderBufferWidth - 1, height - 1); _visibleHeight = height; _visibleWidth = _renderBufferWidth; |