Browse files

Fixed JoyButtonEvent

  • Loading branch information...
1 parent 2907cdb commit 87d11e79a5421b30bbec8fa032129d3c568b6ceb @kthakore kthakore committed Nov 5, 2009
Showing with 24 additions and 15 deletions.
  1. +7 −7 Build.PL
  2. +16 −8 src/Core/objects/JoyButtonEvent.xs
  3. +1 −0 typemap
View
14 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',
View
24 src/Core/objects/JoyButtonEvent.xs
@@ -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:
View
1 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

0 comments on commit 87d11e7

Please sign in to comment.