From: Kartik Thakore Date: Sun, 8 Nov 2009 01:23:42 +0000 (-0500) Subject: Finish JoyHatEvent done X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d77f4a7eb96d5abe1f34a64f4f9dce969439094a;p=sdlgit%2FSDL_perl.git Finish JoyHatEvent done --- diff --git a/src/Core/objects/JoyHatEvent.xs b/src/Core/objects/JoyHatEvent.xs index 394bc16..c4801ba 100644 --- a/src/Core/objects/JoyHatEvent.xs +++ b/src/Core/objects/JoyHatEvent.xs @@ -45,6 +45,12 @@ Uint8 jhevent_which ( event, ... ) SDL_JoyHatEvent *event CODE: + if( items > 1 ) + { + event->which = SvIV( ST(1) ); + + } + RETVAL = event->which; OUTPUT: RETVAL @@ -52,6 +58,13 @@ jhevent_which ( event, ... ) Uint8 jhevent_hat ( event, ... ) SDL_JoyHatEvent *event + if( items > 1 ) + { + event->hat = SvIV( ST(1) ); + + } + + CODE: RETVAL = event->hat; OUTPUT: @@ -61,6 +74,18 @@ Uint8 jhevent_value ( event, ... ) SDL_JoyHatEvent *event CODE: + if( items > 1 ) + { + event->value = SvIV( ST(1) ); + + } + RETVAL = event->value; OUTPUT: RETVAL + +void +jhevent_DESTROY(self) + SDL_JoyHatEvent *self + CODE: + safefree( (char *)self );