aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/openglsdl
diff options
context:
space:
mode:
authorJohannes Schickel2011-08-12 03:46:32 +0200
committerJohannes Schickel2011-08-12 03:46:32 +0200
commita77c29327e8e4c06c3b45dac16b96198a120fefe (patch)
treeeada8adef8555387177e8d87cddde0e58a19441a /backends/graphics/openglsdl
parentbb3d1f2738ccd3fd5a06a2570d23c27a11589288 (diff)
downloadscummvm-rg350-a77c29327e8e4c06c3b45dac16b96198a120fefe.tar.gz
scummvm-rg350-a77c29327e8e4c06c3b45dac16b96198a120fefe.tar.bz2
scummvm-rg350-a77c29327e8e4c06c3b45dac16b96198a120fefe.zip
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.
Diffstat (limited to 'backends/graphics/openglsdl')
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp9
1 files changed, 1 insertions, 8 deletions
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