diff src/video/win32/SDL_win32video.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 e70477157db9
children
line wrap: on
line diff
--- a/src/video/win32/SDL_win32video.c	Sat Jul 08 20:55:39 2006 +0000
+++ b/src/video/win32/SDL_win32video.c	Sun Jul 09 09:02:26 2006 +0000
@@ -84,11 +84,11 @@
 #if SDL_VIDEO_RENDER_D3D
     data->d3dDLL = LoadLibrary(TEXT("D3D9.DLL"));
     if (data->d3dDLL) {
-        IDirect3D9 *WINAPI(*D3DCreate) (UINT SDKVersion);
+        IDirect3D9 *(WINAPI * D3DCreate) (UINT SDKVersion);
 
         D3DCreate =
-            (IDirect3D9 * WINAPI(*)(UINT)) GetProcAddress(data->d3dDLL,
-                                                          "Direct3DCreate9");
+            (IDirect3D9 * (WINAPI *) (UINT)) GetProcAddress(data->d3dDLL,
+                                                            "Direct3DCreate9");
         if (D3DCreate) {
             data->d3d = D3DCreate(D3D_SDK_VERSION);
         }
@@ -101,7 +101,10 @@
 
     /* Set the function pointers */
     device->VideoInit = WIN_VideoInit;
+    device->GetDisplayModes = WIN_GetDisplayModes;
     device->SetDisplayMode = WIN_SetDisplayMode;
+    device->SetDisplayGammaRamp = WIN_SetDisplayGammaRamp;
+    device->GetDisplayGammaRamp = WIN_GetDisplayGammaRamp;
     device->VideoQuit = WIN_VideoQuit;
     device->PumpEvents = WIN_PumpEvents;