Fixed DirectX fullscreen gamma control (thanks John!)
authorSam Lantinga
Tue, 09 Apr 2002 23:49:06 +0000
changeset 334f65715bd8ad8
parent 333 f2ba51f64d49
child 335 bc4d50d2edd9
Fixed DirectX fullscreen gamma control (thanks John!)
src/video/windx5/SDL_dx5video.c
     1.1 --- a/src/video/windx5/SDL_dx5video.c	Tue Apr 09 23:32:40 2002 +0000
     1.2 +++ b/src/video/windx5/SDL_dx5video.c	Tue Apr 09 23:49:06 2002 +0000
     1.3 @@ -405,7 +405,7 @@
     1.4  static int DX5_SetColors(_THIS, int firstcolor, int ncolors,
     1.5  			 SDL_Color *colors);
     1.6  static void DX5_SwapGamma(_THIS);
     1.7 -#ifdef IID_IDirectDrawGammaControl
     1.8 +#ifdef IDirectDrawGammaControl_SetGammaRamp
     1.9  static int DX5_SetGammaRamp(_THIS, Uint16 *ramp);
    1.10  static int DX5_GetGammaRamp(_THIS, Uint16 *ramp);
    1.11  #endif
    1.12 @@ -591,7 +591,7 @@
    1.13  	device->UnlockHWSurface = DX5_UnlockHWSurface;
    1.14  	device->FlipHWSurface = DX5_FlipHWSurface;
    1.15  	device->FreeHWSurface = DX5_FreeHWSurface;
    1.16 -#ifdef IID_IDirectDrawGammaControl
    1.17 +#ifdef IDirectDrawGammaControl_SetGammaRamp
    1.18  	device->SetGammaRamp = DX5_SetGammaRamp;
    1.19  	device->GetGammaRamp = DX5_GetGammaRamp;
    1.20  #endif
    1.21 @@ -796,7 +796,7 @@
    1.22  #if DIRECTDRAW_VERSION <= 0x300
    1.23  #error Your version of DirectX must be greater than or equal to 5.0
    1.24  #endif
    1.25 -#ifndef IID_IDirectDrawGammaControl
    1.26 +#ifndef IDirectDrawGammaControl_SetGammaRamp
    1.27  	/*if gamma is undefined then we really have directx <= 0x500*/
    1.28  	DDCAPS DDCaps;
    1.29  #else
    1.30 @@ -2118,7 +2118,7 @@
    1.31  }
    1.32  
    1.33  /* Gamma code is only available on DirectX 7 and newer */
    1.34 -#ifdef IID_IDirectDrawGammaControl
    1.35 +#ifdef IDirectDrawGammaControl_SetGammaRamp
    1.36  
    1.37  static int DX5_SetGammaRamp(_THIS, Uint16 *ramp)
    1.38  {
    1.39 @@ -2189,7 +2189,7 @@
    1.40  	return (result == DD_OK) ? 0 : -1;
    1.41  }
    1.42  
    1.43 -#endif /* IID_IDirectDrawGammaControl */
    1.44 +#endif /* IDirectDrawGammaControl_SetGammaRamp */
    1.45  
    1.46  void DX5_VideoQuit(_THIS)
    1.47  {