From: Kartik Thakore Date: Mon, 9 Nov 2009 22:45:40 +0000 (-0500) Subject: Tiny typo fixed in Event.xs and Added some prelim tests to check if our logic for... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cf9b0e26689d441c620cf580ee33bf7c973460a1;p=sdlgit%2FSDL_perl.git Tiny typo fixed in Event.xs and Added some prelim tests to check if our logic for double free was correct. --- diff --git a/src/Core/objects/Event.xs b/src/Core/objects/Event.xs index 932aedc..aa49209 100644 --- a/src/Core/objects/Event.xs +++ b/src/Core/objects/Event.xs @@ -413,7 +413,7 @@ event_button_state ( event, ... ) RETVAL Uint16 -event__button_x ( event, ... ) +event_button_x ( event, ... ) SDL_Event *event CODE: SDL_MouseButtonEvent * a = &(event->button); diff --git a/t/core_events.t b/t/core_events.t index 68856a2..a3f2b6f 100644 --- a/t/core_events.t +++ b/t/core_events.t @@ -58,8 +58,16 @@ SDL::Video::set_video_mode(640,480,32, SDL_SWSURFACE); is(SDL::Events::pump_events(), undef, '[pump_events] Returns undef'); -=pod my $event = SDL::Event->new(); + +my $aevent = SDL::Event->new(); + $aevent->type ( SDL_ACTIVEEVENT ); + $aevent->active_gain(1); + $aevent->active_state(SDL_APPINPUTFOCUS); + +SDL::Events::push_event($aevent); pass '[push_event] Event can be pushed'; + +=pod my $aevent = SDL::ActiveEvent->new(); my $weevent = SDL::ExposeEvent->new(); my $jaevent = SDL::JoyAxisEvent->new();