From: Kartik Thakore Date: Thu, 29 Oct 2009 15:27:10 +0000 (-0400) Subject: Made Windows not use Gamma Functions X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=44b3ddf71b4f801c37a1fabaa7c330abaa1a35a1;p=sdlgit%2FSDL_perl.git Made Windows not use Gamma Functions --- diff --git a/src/Core/Video.xs b/src/Core/Video.xs index 2f6797c..95749cb 100644 --- a/src/Core/Video.xs +++ b/src/Core/Video.xs @@ -225,8 +225,12 @@ video_set_gamma(r, g, b) float g; float b; CODE: + RETVAL = -1; +#ifdef WINDOWS + warn( "SDL_SetGamma is unsupported in Windows. "); +#else RETVAL = SDL_SetGamma(r,g,b); - +#endif OUTPUT: RETVAL @@ -237,6 +241,11 @@ video_set_gamma_ramp( rt, gt, bt ) AV* gt; AV* bt; CODE: + + RETVAL = -1; +#ifdef WINDOWS + warn( "SDL_SetGammaRamp is unsupported in Windows. " ); +#else Uint16 *redtable, *greentable, *bluetable; redtable = av_to_uint16(rt); greentable = av_to_uint16(gt); @@ -245,8 +254,7 @@ video_set_gamma_ramp( rt, gt, bt ) if( redtable != NULL) { safefree(redtable); } if( greentable != NULL) { safefree(greentable); } if( bluetable != NULL) { safefree(bluetable); } - - +#endif OUTPUT: RETVAL