diff src/video/win32/SDL_win32events.c @ 1733:0b1070f2f94d SDL-1.3

Implemented gamma correction on Windows. Added general code to restore the video mode and gamma when windows lose focus.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 09 Jul 2006 09:02:26 +0000
parents fd65f12b6de6
children f7c667ded87d
line wrap: on
line diff
--- a/src/video/win32/SDL_win32events.c	Sat Jul 08 20:55:39 2006 +0000
+++ b/src/video/win32/SDL_win32events.c	Sun Jul 09 09:02:26 2006 +0000
@@ -421,6 +421,18 @@
 
     switch (msg) {
 
+    case WM_SHOWWINDOW:
+        {
+            if (wParam) {
+                SDL_SendWindowEvent(data->windowID, SDL_WINDOWEVENT_SHOWN, 0,
+                                    0);
+            } else {
+                SDL_SendWindowEvent(data->windowID, SDL_WINDOWEVENT_HIDDEN, 0,
+                                    0);
+            }
+        }
+        break;
+
     case WM_ACTIVATE:
         {
             int index;
@@ -452,7 +464,6 @@
                         ClipCursor(&rect);
                     }
                 }
-                /* FIXME: Restore mode state (mode, gamma) */
                 /* FIXME: Update keyboard state */
             } else {
                 if (keyboard && keyboard->focus == data->windowID) {
@@ -467,7 +478,6 @@
                     SDL_SendWindowEvent(data->windowID,
                                         SDL_WINDOWEVENT_MINIMIZED, 0, 0);
                 }
-                /* FIXME: Restore desktop state (mode, gamma) */
             }
             return (0);
         }