src/video/wincommon/SDL_sysevents.c
changeset 338 518ffd98a8f6
parent 335 bc4d50d2edd9
child 447 16d0449891b8
     1.1 --- a/src/video/wincommon/SDL_sysevents.c	Thu Apr 11 14:35:16 2002 +0000
     1.2 +++ b/src/video/wincommon/SDL_sysevents.c	Thu Apr 11 15:23:07 2002 +0000
     1.3 @@ -60,6 +60,7 @@
     1.4  #ifndef NO_CHANGEDISPLAYSETTINGS
     1.5  DEVMODE SDL_fullscreen_mode;
     1.6  #endif
     1.7 +WORD *gamma_saved = NULL;
     1.8  
     1.9  
    1.10  /* Functions called by the message processing function */
    1.11 @@ -67,8 +68,8 @@
    1.12  (*HandleMessage)(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)=NULL;
    1.13  void (*WIN_RealizePalette)(_THIS);
    1.14  void (*WIN_PaletteChanged)(_THIS, HWND window);
    1.15 -void (*WIN_SwapGamma)(_THIS);
    1.16  void (*WIN_WinPAINT)(_THIS, HDC hdc);
    1.17 +extern void DIB_SwapGamma(_THIS);
    1.18  
    1.19  static void SDL_RestoreGameMode(void)
    1.20  {
    1.21 @@ -198,7 +199,9 @@
    1.22  					WIN_GrabInput(this, SDL_GRAB_ON);
    1.23  				}
    1.24  				if ( !(SDL_GetAppState()&SDL_APPINPUTFOCUS) ) {
    1.25 -					WIN_SwapGamma(this);
    1.26 +					if ( ! DDRAW_FULLSCREEN() ) {
    1.27 +						DIB_SwapGamma(this);
    1.28 +					}
    1.29  					if ( WINDIB_FULLSCREEN() ) {
    1.30  						SDL_RestoreGameMode();
    1.31  					}
    1.32 @@ -215,7 +218,9 @@
    1.33  					WIN_GrabInput(this, SDL_GRAB_OFF);
    1.34  				}
    1.35  				if ( SDL_GetAppState() & SDL_APPINPUTFOCUS ) {
    1.36 -					WIN_SwapGamma(this);
    1.37 +					if ( ! DDRAW_FULLSCREEN() ) {
    1.38 +						DIB_SwapGamma(this);
    1.39 +					}
    1.40  					if ( WINDIB_FULLSCREEN() ) {
    1.41  						SDL_RestoreDesktopMode();
    1.42  					}