From: Kartik Thakore Date: Thu, 5 Nov 2009 19:47:13 +0000 (-0500) Subject: Fixed JoyButtonEvent X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=87d11e79a5421b30bbec8fa032129d3c568b6ceb;p=sdlgit%2FSDL_perl.git Fixed JoyButtonEvent --- diff --git a/Build.PL b/Build.PL index a77fdc3..d02616b 100644 --- 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', diff --git a/src/Core/objects/JoyButtonEvent.xs b/src/Core/objects/JoyButtonEvent.xs index ffed2a6..d966672 100644 --- a/src/Core/objects/JoyButtonEvent.xs +++ b/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: diff --git a/typemap b/typemap index 8ce6c5d..4cfaa50 100644 --- 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