Fixed JoyButtonEvent
Kartik Thakore [Thu, 5 Nov 2009 19:47:13 +0000 (14:47 -0500)]
Build.PL
src/Core/objects/JoyButtonEvent.xs
typemap

index a77fdc3..d02616b 100644 (file)
--- a/Build.PL
+++ b/Build.PL
@@ -70,13 +70,13 @@ my %subsystems =
                },
                libraries => [qw( SDL )],
        },
-#      JoyButtonEvent => {
-#              file      => {
-#                      from  => 'src/Core/objects/JoyButtonEvent.xs',
-#                      to    => 'lib/SDL/JoyButtonEvent.xs',
-#              },
-#              libraries => [qw( SDL )],
-#      },
+       JoyButtonEvent => {
+               file      => {
+                       from  => 'src/Core/objects/JoyButtonEvent.xs',
+                       to    => 'lib/SDL/JoyButtonEvent.xs',
+               },
+               libraries => [qw( SDL )],
+       },
        JoyHatEvent => {
                file      => {
                        from  => 'src/Core/objects/JoyHatEvent.xs',
index ffed2a6..d966672 100644 (file)
@@ -25,32 +25,40 @@ SDL_JoyButtonEvent -- Joystick button event structure
 =cut
 
 Uint8
-jbevent_type ( event, ... )
-       SDL_JoyButtonEvent *event
+jbevent_type ( event )
+
+       SDL_JoyButtonEvent * event
+
        CODE:
                RETVAL = event->type;
        OUTPUT:
                RETVAL
 
 Uint8
-jbevent_which ( event, ... )
-       SDL_JoyButtonEvent *event
+jbevent_which ( event )
+
+       SDL_JoyButtonEvent * event
+
        CODE: 
                RETVAL = event->which;
        OUTPUT:
                RETVAL
 
 Uint8
-jbevent_button ( event, ... )
-       SDL_JoyButtonEvent *event
+jbevent_button ( event )
+
+       SDL_JoyButtonEvent * event
+
        CODE: 
                RETVAL = event->button;
        OUTPUT:
                RETVAL
 
 Uint8
-jbevent_state ( event, ... )
-       SDL_JoyButtonEvent *event
+jbevent_state ( event )
+
+       SDL_JoyButtonEvent * event
+
        CODE: 
                RETVAL = event->state;
        OUTPUT:
diff --git a/typemap b/typemap
index 8ce6c5d..4cfaa50 100644 (file)
--- a/typemap
+++ b/typemap
@@ -21,6 +21,7 @@ SDL_MouseMotionEvent *        O_OBJECT
 SDL_MouseButtonEvent *         O_OBJECT
 SDL_JoyAxisEvent *     O_OBJECT
 SDL_JoyHatEvent *      O_OBJECT
+SDL_JoyButtonEvent *   O_OBJECT
 SDL_JoyBallEvent *     O_OBJECT
 SDL_ResizeEvent *      O_OBJECT
 SDL_ExposeEvent *      O_OBJECT