]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameDraw.cpp
Drop keyboard input if it was part of the grab or window/fullscreen toggle.
[lugaru.git] / Source / GameDraw.cpp
index b321e7ec0c450e392c24bdd6510bd914eb697348..700ef1190ca9d70121cfdc638c2bba8471ecb04f 100644 (file)
@@ -189,7 +189,7 @@ long long Game::MD5_string (char *string){
        //return 1111111111111111;
 }
 
-int Game::DrawGLScene(GLvoid)                                                                  
+int Game::DrawGLScene(void)
 {      
        static float texcoordwidth,texcoordheight;
        static float texviewwidth, texviewheight;
@@ -1939,7 +1939,7 @@ int Game::DrawGLScene(GLvoid)
 
                if(drawmode!=normalmode){
                        glEnable(GL_TEXTURE_2D);
-                       //glFinish();
+                       glFinish();
                        if(!drawtoggle||drawmode!=realmotionblurmode||(drawtoggle==2||change==1)){
                                if(screentexture){
 
@@ -3940,8 +3940,14 @@ int Game::DrawGLScene(GLvoid)
 
        //glFlush();
        if(drawmode!=motionblurmode||mainmenu){
+        #if !USE_SDL
+        // this prevents menus from rendering if you hit ESC during
+        //  motion blur sequences...maybe SDL is buffering differently?
                if(drawmode!=motionblurmode)
                        swap_gl_buffers();
+        #else
+               swap_gl_buffers();
+        #endif
        }
 
        //myassert(glGetError() == GL_NO_ERROR);