diff options
author | Alejandro Marzini | 2010-08-13 05:00:38 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-08-13 05:00:38 +0000 |
commit | d84428e678fb04325253c05e6651192c62930f08 (patch) | |
tree | 7d1a9c2e65c10e4ad1d97639084d8e15afc2dc89 /backends | |
parent | a3711160ef531a73b55c7f6ddb7548f44c843bec (diff) | |
download | scummvm-rg350-d84428e678fb04325253c05e6651192c62930f08.tar.gz scummvm-rg350-d84428e678fb04325253c05e6651192c62930f08.tar.bz2 scummvm-rg350-d84428e678fb04325253c05e6651192c62930f08.zip |
OPENGL: Disable resizable window when not using an aspect ratio correction.
svn-id: r52055
Diffstat (limited to 'backends')
-rw-r--r-- | backends/graphics/openglsdl/openglsdl-graphics.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index 6c87925f22..d04eb27d26 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -356,10 +356,15 @@ bool OpenGLSdlGraphicsManager::loadGFXMode() { // Failed setuping a fullscreen mode return false; + uint32 flags = SDL_OPENGL; + + if (_videoMode.fullscreen) + flags |= SDL_FULLSCREEN; + else if (_videoMode.aspectRatioCorrection == kAspectRatioNone) + flags |= SDL_RESIZABLE; + // Create our window - _hwscreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 32, - _videoMode.fullscreen ? (SDL_FULLSCREEN | SDL_OPENGL) : (SDL_OPENGL | SDL_RESIZABLE) - ); + _hwscreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 32, flags); #ifdef USE_RGB_COLOR detectSupportedFormats(); #endif |