summaryrefslogtreecommitdiff
path: root/src/openglgraphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r--src/openglgraphics.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 9fb91b201..069af6c7f 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -71,7 +71,8 @@ void OpenGLGraphics::setSync(bool sync)
mSync = sync;
}
-bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel)
+bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs,
+ bool hwaccel, bool resize)
{
logger->log("Setting video mode %dx%d %s",
w, h, fs ? "fullscreen" : "windowed");
@@ -83,6 +84,7 @@ bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel)
mBpp = bpp;
mFullscreen = fs;
mHWAccel = hwaccel;
+ mEnableResize = resize;
if (fs)
{
@@ -93,7 +95,8 @@ bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel)
// Resizing currently not supported on Windows, where it would require
// reuploading all textures.
#if !defined(_WIN32)
- displayFlags |= SDL_RESIZABLE;
+ if (resize)
+ displayFlags |= SDL_RESIZABLE;
#endif
}