summaryrefslogtreecommitdiff
path: root/src/opengl1graphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-02 19:42:02 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-02 19:42:02 +0300
commite8f92c8a476c35f76212ccaccbbb55901a49058e (patch)
tree741bdd9b2068ded23ab92a06586422b400c53d24 /src/opengl1graphics.cpp
parent2d0696abd547cf00fda04f070fb713c92acaf91b (diff)
downloadplus-e8f92c8a476c35f76212ccaccbbb55901a49058e.tar.gz
plus-e8f92c8a476c35f76212ccaccbbb55901a49058e.tar.bz2
plus-e8f92c8a476c35f76212ccaccbbb55901a49058e.tar.xz
plus-e8f92c8a476c35f76212ccaccbbb55901a49058e.zip
Add "no frame" option to hide window frame. Disabled by default.
Diffstat (limited to 'src/opengl1graphics.cpp')
-rw-r--r--src/opengl1graphics.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/opengl1graphics.cpp b/src/opengl1graphics.cpp
index 41a665524..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 resize)
+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");
@@ -75,6 +75,7 @@ bool OpenGL1Graphics::setVideoMode(int w, int h, int bpp,
mFullscreen = fs;
mHWAccel = hwaccel;
mEnableResize = resize;
+ mNoFrame = noFrame;
if (fs)
{
@@ -90,6 +91,9 @@ bool OpenGL1Graphics::setVideoMode(int w, int h, int bpp,
#endif
}
+ if (noFrame)
+ displayFlags |= SDL_NOFRAME;
+
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
if (!(mTarget = SDL_SetVideoMode(w, h, bpp, displayFlags)))