]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix severe bug in my previous screensaver-disable patch that caused all
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 21 Feb 2008 11:50:57 +0000 (11:50 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 21 Feb 2008 11:50:57 +0000 (11:50 +0000)
window widgets to be ignored (minimize, close, etc)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8120 d7cf8633-e32d-0410-b094-e92efae38249

vid_wgl.c

index 2c05701adb3c28064fb1bd332db67b2475fc632c..36520ee2cb57368c34d9e068da704814ec00df8f 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -542,8 +542,11 @@ LONG WINAPI MainWndProc (HWND hWnd, UINT uMsg, WPARAM  wParam, LPARAM lParam)
 
                case WM_SYSCOMMAND:
                        // prevent screensaver from occuring while the active window
+                       // note: password-locked screensavers on Vista still work
                        if (vid_activewindow && ((wParam & 0xFFF0) == SC_SCREENSAVE || (wParam & 0xFFF0) == SC_MONITORPOWER))
-                               lRet = 0;; // note: password-locked screensavers on Vista still work
+                               lRet = 0;
+                       else
+                               lRet = DefWindowProc (hWnd, uMsg, wParam, lParam);
                        break;
 
        // this is complicated because Win32 seems to pack multiple mouse events into