diff options
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 8 | ||||
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.h | 5 |
2 files changed, 7 insertions, 6 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; diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index 8a110b2d5f..42cfbacc85 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -214,10 +214,7 @@ protected: virtual void calculateDisplaySize(int &width, int &height); virtual void refreshDisplaySize(); - /** - * Returns the current target aspect ratio x 10000 - */ - virtual uint getAspectRatio(); + uint getAspectRatio() const; bool _formatBGR; |