X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=src%2FSDL.xs;h=a84d7c0694b8c3513d94ca359c00ff4a7a1a3992;hb=65b2187d7fca182e8689d1af3ba44f5f946dcc35;hp=8e14ce2124fc2b9f3bccf7b9726cfcd7a4a5539e;hpb=15a6855a1873836b12bf4f67f0cb600bd4209b6f;p=sdlgit%2FSDL_perl.git diff --git a/src/SDL.xs b/src/SDL.xs index 8e14ce2..a84d7c0 100644 --- a/src/SDL.xs +++ b/src/SDL.xs @@ -110,6 +110,16 @@ extern PerlInterpreter *parent_perl; #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 ) { @@ -254,6 +264,7 @@ init ( flags ) 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);