Mercurial > sdl-ios-xcode
diff src/video/wincommon/SDL_sysevents.c @ 338:518ffd98a8f6
Fixed gamma ramps in DirectX windowed and OpenGL modes
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 11 Apr 2002 15:23:07 +0000 |
parents | bc4d50d2edd9 |
children | 16d0449891b8 |
line wrap: on
line diff
--- a/src/video/wincommon/SDL_sysevents.c Thu Apr 11 14:35:16 2002 +0000 +++ b/src/video/wincommon/SDL_sysevents.c Thu Apr 11 15:23:07 2002 +0000 @@ -60,6 +60,7 @@ #ifndef NO_CHANGEDISPLAYSETTINGS DEVMODE SDL_fullscreen_mode; #endif +WORD *gamma_saved = NULL; /* Functions called by the message processing function */ @@ -67,8 +68,8 @@ (*HandleMessage)(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)=NULL; void (*WIN_RealizePalette)(_THIS); void (*WIN_PaletteChanged)(_THIS, HWND window); -void (*WIN_SwapGamma)(_THIS); void (*WIN_WinPAINT)(_THIS, HDC hdc); +extern void DIB_SwapGamma(_THIS); static void SDL_RestoreGameMode(void) { @@ -198,7 +199,9 @@ WIN_GrabInput(this, SDL_GRAB_ON); } if ( !(SDL_GetAppState()&SDL_APPINPUTFOCUS) ) { - WIN_SwapGamma(this); + if ( ! DDRAW_FULLSCREEN() ) { + DIB_SwapGamma(this); + } if ( WINDIB_FULLSCREEN() ) { SDL_RestoreGameMode(); } @@ -215,7 +218,9 @@ WIN_GrabInput(this, SDL_GRAB_OFF); } if ( SDL_GetAppState() & SDL_APPINPUTFOCUS ) { - WIN_SwapGamma(this); + if ( ! DDRAW_FULLSCREEN() ) { + DIB_SwapGamma(this); + } if ( WINDIB_FULLSCREEN() ) { SDL_RestoreDesktopMode(); }