]> git.jsancho.org Git - lugaru.git/blobdiff - Source/OpenGL_Windows.cpp
CMake: Purge all the bundled dependencies
[lugaru.git] / Source / OpenGL_Windows.cpp
index dc30a03c41b04e4fd23c0fad8318f3ef40ca8e3b..a5ca6c04cc8f513a18a66ad77eb2c099d31e062b 100644 (file)
@@ -129,10 +129,12 @@ static bool lookup_all_glsyms(void)
     return retval;
 }
 
+#ifndef __MINGW32__ // FIXME: Temporary workaround for GL-8
 static void GLAPIENTRY glDeleteTextures_doNothing(GLsizei n, const GLuint *textures)
 {
     // no-op.
 }
+#endif // __MINGW32__
 
 #ifdef MessageBox
 #undef MessageBox
@@ -217,8 +219,9 @@ void initGL()
     }
 }
 
-static void toggleFullscreen()
+void toggleFullscreen()
 {
+    fullscreen = !fullscreen;
     Uint32 flags = SDL_GetWindowFlags(sdlwindow);
     if (flags & SDL_WINDOW_FULLSCREEN) {
         flags &= ~SDL_WINDOW_FULLSCREEN;
@@ -331,8 +334,10 @@ Boolean SetUp ()
     SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 1);
 
     Uint32 sdlflags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN;
-    if (!cmdline("windowed"))
+    if ((fullscreen || cmdline("fullscreen")) && !cmdline("windowed")) {
+        fullscreen = 1;
         sdlflags |= SDL_WINDOW_FULLSCREEN;
+    }
     if (!cmdline("nomousegrab"))
         sdlflags |= SDL_WINDOW_INPUT_GRABBED;