summaryrefslogtreecommitdiff
path: root/src/opengl1graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl1graphics.cpp')
-rw-r--r--src/opengl1graphics.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/opengl1graphics.cpp b/src/opengl1graphics.cpp
index 6f712f698..34e9fcda3 100644
--- a/src/opengl1graphics.cpp
+++ b/src/opengl1graphics.cpp
@@ -61,8 +61,8 @@ void OpenGL1Graphics::setSync(bool sync)
mSync = sync;
}
-bool OpenGL1Graphics::setVideoMode(int w, int h, int bpp,
- bool fs, bool hwaccel)
+bool OpenGL1Graphics::setVideoMode(int w, int h, int bpp, bool fs,
+ bool hwaccel, bool resize, bool noFrame)
{
logger->log("Setting video mode %dx%d %s",
w, h, fs ? "fullscreen" : "windowed");
@@ -74,9 +74,25 @@ bool OpenGL1Graphics::setVideoMode(int w, int h, int bpp,
mBpp = bpp;
mFullscreen = fs;
mHWAccel = hwaccel;
+ mEnableResize = resize;
+ mNoFrame = noFrame;
if (fs)
+ {
displayFlags |= SDL_FULLSCREEN;
+ }
+ else
+ {
+ // Resizing currently not supported on Windows, where it would require
+ // reuploading all textures.
+#if !defined(_WIN32)
+ if (resize)
+ displayFlags |= SDL_RESIZABLE;
+#endif
+ }
+
+ if (noFrame)
+ displayFlags |= SDL_NOFRAME;
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
@@ -472,6 +488,7 @@ void OpenGL1Graphics::_beginDraw()
void OpenGL1Graphics::_endDraw()
{
+ popClipArea();
}
SDL_Surface* OpenGL1Graphics::getScreenshot()