From a77c29327e8e4c06c3b45dac16b96198a120fefe Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 12 Aug 2011 03:46:32 +0200 Subject: OPENGLSDL: Do not change requested window size on resize. This should help fix a lock up on window managers, which will try to force the ScummVM window to a certain size, by just requesting the same size over and over again. Now we get black borders even in windowed mode when the aspect of the window does not match the aspect of the game screen (and we are not in "normal" mode), but that is usually the same in video players too, so shouldn't be too bad. --- backends/graphics/openglsdl/openglsdl-graphics.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'backends/graphics') diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index 8ea95768df..d2810818e7 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -640,10 +640,7 @@ void OpenGLSdlGraphicsManager::notifyResize(const uint width, const uint height) _videoMode.hardwareWidth = width; _videoMode.hardwareHeight = height; - if (_videoMode.mode != OpenGL::GFX_ORIGINAL) { - _screenResized = true; - calculateDisplaySize(_videoMode.hardwareWidth, _videoMode.hardwareHeight); - } + _screenResized = true; int scale = MIN(_videoMode.hardwareWidth / _videoMode.screenWidth, _videoMode.hardwareHeight / _videoMode.screenHeight); @@ -653,10 +650,6 @@ void OpenGLSdlGraphicsManager::notifyResize(const uint width, const uint height) setScale(MAX(MIN(scale, 3), 1)); } - if (_videoMode.mode == OpenGL::GFX_ORIGINAL) { - calculateDisplaySize(_videoMode.hardwareWidth, _videoMode.hardwareHeight); - } - _transactionDetails.sizeChanged = true; endGFXTransaction(); #ifdef USE_OSD -- cgit v1.2.3