Events which can have multiple types should get and set type
Kartik Thakore [Sun, 8 Nov 2009 16:06:06 +0000 (11:06 -0500)]
src/Core/objects/JoyButtonEvent.xs

index ae6e01d..e332d4e 100644 (file)
@@ -34,11 +34,17 @@ jbevent_new ( CLASS )
                RETVAL
 
 Uint8
-jbevent_type ( event )
+jbevent_type ( event, ... )
 
        SDL_JoyButtonEvent * event
 
        CODE:
+               if( items > 1 )
+               {
+                       event->type = SvIV( ST(1) );
+
+               }
+
                RETVAL = event->type;
        OUTPUT:
                RETVAL