diff options
author | Johannes Schickel | 2011-12-15 21:45:52 +0100 |
---|---|---|
committer | Johannes Schickel | 2011-12-15 21:48:14 +0100 |
commit | c91b6d7d357300597e74126b48aa1473587a8133 (patch) | |
tree | 73d48409972dc90dd2473a893610a9b7babe290d /backends | |
parent | 7ac5bcd6f180129c4dc79b24403ef14753f2fd8a (diff) | |
download | scummvm-rg350-c91b6d7d357300597e74126b48aa1473587a8133.tar.gz scummvm-rg350-c91b6d7d357300597e74126b48aa1473587a8133.tar.bz2 scummvm-rg350-c91b6d7d357300597e74126b48aa1473587a8133.zip |
OPENGLSDL: Fix video mode initialization for 640x400 games with AR enabled.
Formerly they always used a height of 240 * scaleFactor, which would for
exmaple make the games requesting a 1x scaler use a height of 240 if AR
is enabled.
This was a regression from b8dcd9a25eb27ef40aa5535fc83879d20db7e10c.
Diffstat (limited to 'backends')
-rw-r--r-- | backends/graphics/openglsdl/openglsdl-graphics.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index cfc78cfcac..ab44b00104 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -318,12 +318,14 @@ bool OpenGLSdlGraphicsManager::loadGFXMode() { // only used to ensure that the original pixel size aspect for these // modes is used. // (Non-square pixels on old monitors vs square pixel on new ones). - if (_videoMode.aspectRatioCorrection - && ((_videoMode.screenWidth == 320 && _videoMode.screenHeight == 200) - || (_videoMode.screenWidth == 640 && _videoMode.screenHeight == 400))) - _videoMode.overlayHeight = _videoMode.hardwareHeight = 240 * scaleFactor; - else + if (_videoMode.aspectRatioCorrection) { + if (_videoMode.screenWidth == 320 && _videoMode.screenHeight == 200) + _videoMode.overlayHeight = _videoMode.hardwareHeight = 240 * scaleFactor; + else if (_videoMode.screenWidth == 640 && _videoMode.screenHeight == 400) + _videoMode.overlayHeight = _videoMode.hardwareHeight = 480 * scaleFactor; + } else { _videoMode.overlayHeight = _videoMode.hardwareHeight = _videoMode.screenHeight * scaleFactor; + } } _screenResized = false; |