#endif
+void
+windows_force_driver ()
+{
+ const SDL_version *version = SDL_Linked_Version();
+ if(version->patch == 14)
+ {
+ putenv("SDL_VIDEODRIVER=directx");
+ }
+ else
+ {
+ putenv("SDL_VIDEODRIVER=windib");
+ }
+}
+
Uint32
sdl_perl_timer_callback ( Uint32 interval, void* param )
{
Uint32 flags
CODE:
INIT_NS_APPLICATION
+#if defined WINDOWS || WIN32
+ windows_force_driver();
+#endif
RETVAL = SDL_Init(flags);
#ifdef HAVE_TLS_CONTEXT
Perl_call_atexit(PERL_GET_CONTEXT, (void*)sdl_perl_atexit,0);
RETVAL
Uint8
-KeyEventScanCode ( e )
+key_scancode ( e )
SDL_Event *e
CODE:
RETVAL = e->key.keysym.scancode;
RETVAL
Uint8
-MouseButtonState ( e )
+button_state ( e )
SDL_Event *e
CODE:
RETVAL = e->button.state;
RETVAL
Uint8
-MouseButton ( e )
+button ( e )
SDL_Event *e
CODE:
RETVAL = e->button.button;
RETVAL
Uint16
-MouseButtonX ( e )
+button_x ( e )
SDL_Event *e
CODE:
RETVAL = e->button.x;
RETVAL
Uint16
-MouseButtonY ( e )
+button_y ( e )
SDL_Event *e
CODE:
RETVAL = e->button.y;
SDL_SetModState(state);
char *
-GetKeyName ( sym )
+get_key_name ( sym )
int sym
CODE:
RETVAL = SDL_GetKeyName(sym);