summaryrefslogtreecommitdiff
path: root/src/opengl1graphics.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/opengl1graphics.cpp
parent8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c (diff)
downloadplus-c2351483dc7c918a592f2a1f52745c6552fb7d0c.tar.gz
plus-c2351483dc7c918a592f2a1f52745c6552fb7d0c.tar.bz2
plus-c2351483dc7c918a592f2a1f52745c6552fb7d0c.tar.xz
plus-c2351483dc7c918a592f2a1f52745c6552fb7d0c.zip
Add option for enable/disable window resize.
Diffstat (limited to 'src/opengl1graphics.cpp')
-rw-r--r--src/opengl1graphics.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/opengl1graphics.cpp b/src/opengl1graphics.cpp
index 7995b122b..41a665524 100644
--- a/src/opengl1graphics.cpp
+++ b/src/opengl1graphics.cpp
@@ -62,7 +62,7 @@ void OpenGL1Graphics::setSync(bool sync)
}
bool OpenGL1Graphics::setVideoMode(int w, int h, int bpp,
- bool fs, bool hwaccel)
+ bool fs, bool hwaccel, bool resize)
{
logger->log("Setting video mode %dx%d %s",
w, h, fs ? "fullscreen" : "windowed");
@@ -74,6 +74,7 @@ bool OpenGL1Graphics::setVideoMode(int w, int h, int bpp,
mBpp = bpp;
mFullscreen = fs;
mHWAccel = hwaccel;
+ mEnableResize = resize;
if (fs)
{
@@ -84,7 +85,8 @@ bool OpenGL1Graphics::setVideoMode(int w, int h, int bpp,
// 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
}