From c2351483dc7c918a592f2a1f52745c6552fb7d0c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 30 Jan 2012 17:03:58 +0300 Subject: Add option for enable/disable window resize. --- src/opengl1graphics.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/opengl1graphics.cpp') 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 } -- cgit v1.2.3-60-g2f50