]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
no need to update lightmaps if using r_vertexsurfaces
[xonotic/darkplaces.git] / vid_wgl.c
index 9251b84b44116b5b31e2710f561d7c5e95280a43..578b94a15e3a597fa553d66a304275927fd0ad49 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -345,7 +345,7 @@ void VID_Finish (void)
 
 // handle the mouse state when windowed if that's changed
        vid_usemouse = false;
-       if (vid_mouse.integer && key_dest == key_game)
+       if (vid_mouse.integer && !key_consoleactive)
                vid_usemouse = true;
        if (modestate == MS_FULLDIB)
                vid_usemouse = true;
@@ -401,6 +401,9 @@ void VID_Shutdown (void)
                if (hRC)
                        wglDeleteContext(hRC);
 
+               // close the library before we get rid of the window
+               GL_CloseLibrary();
+
                if (hDC && mainwindow)
                        ReleaseDC(mainwindow, hDC);
 
@@ -414,8 +417,6 @@ void VID_Shutdown (void)
 
                VID_RestoreSystemGamma();
        }
-
-       GL_CloseLibrary();
 }