#include <SDL.h>
+#define WARNMSG "is unsupported in windows. Contact us at #sdl irc.perl.org or sdl-devel@perl.org for help."
static Uint16* av_to_uint16 (AV* av)
{
float g;
float b;
CODE:
+ RETVAL = -1;
+#if defined WIN32 || WINDOWS
+ warn( "set_gamma: %s", WARNMSG );
+#else
RETVAL = SDL_SetGamma(r,g,b);
+#endif
+
OUTPUT:
RETVAL
AV* gt;
AV* bt;
CODE:
+#if defined WIN32 || WINDOWS
+ warn( "set_gamma_ramp: %s", WARNMSG );
+#else
Uint16 *redtable, *greentable, *bluetable;
redtable = av_to_uint16(rt);
greentable = av_to_uint16(gt);
if( redtable != NULL) { safefree(redtable); }
if( greentable != NULL) { safefree(greentable); }
if( bluetable != NULL) { safefree(bluetable); }
+#endif
OUTPUT:
RETVAL
#endif
-int
-force_directx()
-{
-#if defined WIN32 || WINDOWS
- fprintf( stderr, "SDL Gamma is unsupported in Windows for windib. Forcing directx. \n" );
- SDL_putenv("SDL_VIDEODRIVER=directx");
-#endif
- return 1;
-}
-
Uint32
sdl_perl_timer_callback ( Uint32 interval, void* param )
{
Uint32 flags
CODE:
INIT_NS_APPLICATION
- force_directx();
RETVAL = SDL_Init(flags);
#ifdef HAVE_TLS_CONTEXT
Perl_call_atexit(PERL_GET_CONTEXT, (void*)sdl_perl_atexit,0);