summaryrefslogtreecommitdiff
path: root/src/openglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-30 17:03:58 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-30 19:53:08 +0300
commitc2351483dc7c918a592f2a1f52745c6552fb7d0c (patch)
tree3bea6a36d7133b32bb67b037aad115b7785e6550 /src/openglgraphics.cpp
parent8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c (diff)
downloadmanaverse-c2351483dc7c918a592f2a1f52745c6552fb7d0c.tar.gz
manaverse-c2351483dc7c918a592f2a1f52745c6552fb7d0c.tar.bz2
manaverse-c2351483dc7c918a592f2a1f52745c6552fb7d0c.tar.xz
manaverse-c2351483dc7c918a592f2a1f52745c6552fb7d0c.zip
Add option for enable/disable window resize.
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
}