summaryrefslogtreecommitdiff
path: root/src/openglgraphics.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/openglgraphics.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/openglgraphics.cpp')
-rw-r--r--src/openglgraphics.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 069af6c7f..2c3d914b0 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -72,7 +72,7 @@ void OpenGLGraphics::setSync(bool sync)
}
bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs,
- bool hwaccel, bool resize)
+ bool hwaccel, bool resize, bool noFrame)
{
logger->log("Setting video mode %dx%d %s",
w, h, fs ? "fullscreen" : "windowed");
@@ -85,6 +85,7 @@ bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs,
mFullscreen = fs;
mHWAccel = hwaccel;
mEnableResize = resize;
+ mNoFrame = noFrame;
if (fs)
{
@@ -100,6 +101,9 @@ bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs,
#endif
}
+ if (noFrame)
+ displayFlags |= SDL_NOFRAME;
+
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
if (!(mTarget = SDL_SetVideoMode(w, h, bpp, displayFlags)))