From d84428e678fb04325253c05e6651192c62930f08 Mon Sep 17 00:00:00 2001 From: Alejandro Marzini Date: Fri, 13 Aug 2010 05:00:38 +0000 Subject: OPENGL: Disable resizable window when not using an aspect ratio correction. svn-id: r52055 --- backends/graphics/openglsdl/openglsdl-graphics.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'backends/graphics') 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 -- cgit v1.2.3