X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=vid_wgl.c;h=578b94a15e3a597fa553d66a304275927fd0ad49;hb=00322258fc19f151087caff9cacef0d7589f7fb4;hp=4979397a3daacf3410be3747e01361bef230f29e;hpb=b2f7fe6f3ec6934b89161592c5df77b3932f2698;p=xonotic%2Fdarkplaces.git diff --git a/vid_wgl.c b/vid_wgl.c index 4979397a..578b94a1 100644 --- 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(); } @@ -539,7 +540,7 @@ void AppActivate(BOOL fActive, BOOL minimize) static BOOL sound_active; vid_activewindow = fActive; - Minimized = minimize; + vid_hidden = minimize; // enable/disable sound on focus gain/loss if (!vid_activewindow && sound_active)