X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FOpenGL_Windows.cpp;h=a5ca6c04cc8f513a18a66ad77eb2c099d31e062b;hb=5931bd1edf827e8645f89b5a4a16585cb25bc6e1;hp=dc30a03c41b04e4fd23c0fad8318f3ef40ca8e3b;hpb=f2af094c2b32baf5b605214f5451df5cc8f611a1;p=lugaru.git diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index dc30a03..a5ca6c0 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -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;