From c91b6d7d357300597e74126b48aa1473587a8133 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 15 Dec 2011 21:45:52 +0100 Subject: 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. --- backends/graphics/openglsdl/openglsdl-graphics.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'backends/graphics/openglsdl/openglsdl-graphics.cpp') 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; -- cgit v1.2.3