diff src/video/macdsp/SDL_dspvideo.c @ 3962:7cdb1d7fc93b SDL-1.2

Support for Gamma Ramps on Mac OS Classic in both the macrom and macdsp video targets, thanks to Gregory Smith! Fixes Bugzilla #431.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 15 Jun 2007 06:29:52 +0000
parents ab8297bf3768
children a1b03ba2fcd0
line wrap: on
line diff
--- a/src/video/macdsp/SDL_dspvideo.c	Fri Jun 15 05:41:22 2007 +0000
+++ b/src/video/macdsp/SDL_dspvideo.c	Fri Jun 15 06:29:52 2007 +0000
@@ -297,6 +297,10 @@
 	device->UnlockHWSurface = DSp_UnlockHWSurface;
 	device->FlipHWSurface   = DSp_FlipHWSurface;
 	device->FreeHWSurface   = DSp_FreeHWSurface;
+#if SDL_MACCLASSIC_GAMMA_SUPPORT
+	device->SetGammaRamp    = Mac_SetGammaRamp;
+	device->GetGammaRamp    = Mac_GetGammaRamp;
+#endif
 #if SDL_VIDEO_OPENGL
 	device->GL_MakeCurrent  = Mac_GL_MakeCurrent;
 	device->GL_SwapBuffers  = DSp_GL_SwapBuffers;
@@ -1381,6 +1385,10 @@
 	/* Free Palette and restore original */
 	DSp_DestroyPalette (this);
 
+#if SDL_MACCLASSIC_GAMMA_SUPPORT
+	Mac_QuitGamma(this);
+#endif
+
 	/* Free list of video modes */
 	if ( SDL_modelist != NULL ) {
 		for ( i=0; SDL_modelist[i]; i++ ) {