403 static SDL_Rect **DX5_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags); |
403 static SDL_Rect **DX5_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags); |
404 static SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current, int width, int height, int bpp, Uint32 flags); |
404 static SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current, int width, int height, int bpp, Uint32 flags); |
405 static int DX5_SetColors(_THIS, int firstcolor, int ncolors, |
405 static int DX5_SetColors(_THIS, int firstcolor, int ncolors, |
406 SDL_Color *colors); |
406 SDL_Color *colors); |
407 static void DX5_SwapGamma(_THIS); |
407 static void DX5_SwapGamma(_THIS); |
408 #ifdef IID_IDirectDrawGammaControl |
408 #ifdef IDirectDrawGammaControl_SetGammaRamp |
409 static int DX5_SetGammaRamp(_THIS, Uint16 *ramp); |
409 static int DX5_SetGammaRamp(_THIS, Uint16 *ramp); |
410 static int DX5_GetGammaRamp(_THIS, Uint16 *ramp); |
410 static int DX5_GetGammaRamp(_THIS, Uint16 *ramp); |
411 #endif |
411 #endif |
412 static void DX5_VideoQuit(_THIS); |
412 static void DX5_VideoQuit(_THIS); |
413 |
413 |
589 device->SetHWAlpha = DX5_SetHWAlpha; |
589 device->SetHWAlpha = DX5_SetHWAlpha; |
590 device->LockHWSurface = DX5_LockHWSurface; |
590 device->LockHWSurface = DX5_LockHWSurface; |
591 device->UnlockHWSurface = DX5_UnlockHWSurface; |
591 device->UnlockHWSurface = DX5_UnlockHWSurface; |
592 device->FlipHWSurface = DX5_FlipHWSurface; |
592 device->FlipHWSurface = DX5_FlipHWSurface; |
593 device->FreeHWSurface = DX5_FreeHWSurface; |
593 device->FreeHWSurface = DX5_FreeHWSurface; |
594 #ifdef IID_IDirectDrawGammaControl |
594 #ifdef IDirectDrawGammaControl_SetGammaRamp |
595 device->SetGammaRamp = DX5_SetGammaRamp; |
595 device->SetGammaRamp = DX5_SetGammaRamp; |
596 device->GetGammaRamp = DX5_GetGammaRamp; |
596 device->GetGammaRamp = DX5_GetGammaRamp; |
597 #endif |
597 #endif |
598 #ifdef HAVE_OPENGL |
598 #ifdef HAVE_OPENGL |
599 device->GL_LoadLibrary = WIN_GL_LoadLibrary; |
599 device->GL_LoadLibrary = WIN_GL_LoadLibrary; |
794 { |
794 { |
795 /* This needs to be DDCAPS_DX5 for the DirectDraw2 interface */ |
795 /* This needs to be DDCAPS_DX5 for the DirectDraw2 interface */ |
796 #if DIRECTDRAW_VERSION <= 0x300 |
796 #if DIRECTDRAW_VERSION <= 0x300 |
797 #error Your version of DirectX must be greater than or equal to 5.0 |
797 #error Your version of DirectX must be greater than or equal to 5.0 |
798 #endif |
798 #endif |
799 #ifndef IID_IDirectDrawGammaControl |
799 #ifndef IDirectDrawGammaControl_SetGammaRamp |
800 /*if gamma is undefined then we really have directx <= 0x500*/ |
800 /*if gamma is undefined then we really have directx <= 0x500*/ |
801 DDCAPS DDCaps; |
801 DDCAPS DDCaps; |
802 #else |
802 #else |
803 DDCAPS_DX5 DDCaps; |
803 DDCAPS_DX5 DDCaps; |
804 #endif |
804 #endif |
2116 { |
2116 { |
2117 return; |
2117 return; |
2118 } |
2118 } |
2119 |
2119 |
2120 /* Gamma code is only available on DirectX 7 and newer */ |
2120 /* Gamma code is only available on DirectX 7 and newer */ |
2121 #ifdef IID_IDirectDrawGammaControl |
2121 #ifdef IDirectDrawGammaControl_SetGammaRamp |
2122 |
2122 |
2123 static int DX5_SetGammaRamp(_THIS, Uint16 *ramp) |
2123 static int DX5_SetGammaRamp(_THIS, Uint16 *ramp) |
2124 { |
2124 { |
2125 LPDIRECTDRAWGAMMACONTROL gamma; |
2125 LPDIRECTDRAWGAMMACONTROL gamma; |
2126 DDGAMMARAMP gamma_ramp; |
2126 DDGAMMARAMP gamma_ramp; |