aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl/opengl-graphics.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2011-08-12 04:06:54 +0200
committerJohannes Schickel2011-08-12 04:06:54 +0200
commitb8dcd9a25eb27ef40aa5535fc83879d20db7e10c (patch)
treef89d4f9ef35a6bdfcd45e9db1bdee008dfa813eb /backends/graphics/opengl/opengl-graphics.cpp
parenta77c29327e8e4c06c3b45dac16b96198a120fefe (diff)
downloadscummvm-rg350-b8dcd9a25eb27ef40aa5535fc83879d20db7e10c.tar.gz
scummvm-rg350-b8dcd9a25eb27ef40aa5535fc83879d20db7e10c.tar.bz2
scummvm-rg350-b8dcd9a25eb27ef40aa5535fc83879d20db7e10c.zip
OPENGL: Fix aspect ratio correction behavior.
Now only 320x200 and 640x400 will result in aspect ratio correction to be used if the user requested it. This should fix some strechting in Myst/Riven.
Diffstat (limited to 'backends/graphics/opengl/opengl-graphics.cpp')
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 57c2378649..40ef17e477 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -1245,12 +1245,16 @@ void OpenGLGraphicsManager::toggleAntialiasing() {
_transactionDetails.filterChanged = true;
}
-uint OpenGLGraphicsManager::getAspectRatio() {
+uint OpenGLGraphicsManager::getAspectRatio() const {
// In case we enable aspect ratio correction we force a 4/3 ratio.
+ // But just for 320x200 and 640x400 games, since other games do not need
+ // this.
// TODO: This makes OpenGL Normal behave like OpenGL Conserve, when aspect
// ratio correction is enabled, but it's better than the previous 4/3 mode
// mess at least...
- if (_videoMode.aspectRatioCorrection)
+ if (_videoMode.aspectRatioCorrection
+ && ((_videoMode.screenWidth == 320 && _videoMode.screenHeight == 200)
+ || (_videoMode.screenWidth == 640 && _videoMode.screenHeight == 400)))
return 13333;
else if (_videoMode.mode == OpenGL::GFX_NORMAL)
return _videoMode.hardwareWidth * 10000 / _videoMode.hardwareHeight;