diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-02 19:42:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-02 19:42:02 +0300 |
commit | e8f92c8a476c35f76212ccaccbbb55901a49058e (patch) | |
tree | 741bdd9b2068ded23ab92a06586422b400c53d24 /src/openglgraphics.cpp | |
parent | 2d0696abd547cf00fda04f070fb713c92acaf91b (diff) | |
download | manaverse-e8f92c8a476c35f76212ccaccbbb55901a49058e.tar.gz manaverse-e8f92c8a476c35f76212ccaccbbb55901a49058e.tar.bz2 manaverse-e8f92c8a476c35f76212ccaccbbb55901a49058e.tar.xz manaverse-e8f92c8a476c35f76212ccaccbbb55901a49058e.zip |
Add "no frame" option to hide window frame. Disabled by default.
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r-- | src/openglgraphics.cpp | 6 |
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))) |