projects
/
sdlgit/SDL_perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
fedf50f
)
Exit the infinite event loop if no pending events
Kartik Thakore [Mon, 9 Nov 2009 15:09:11 +0000 (10:09 -0500)]
t/core_events.t
patch
|
blob
|
blame
|
history
diff --git
a/t/core_events.t
b/t/core_events.t
index
d5d670e
..
909c6e9
100644
(file)
--- a/
t/core_events.t
+++ b/
t/core_events.t
@@
-132,7
+132,7
@@
while(1)
{
SDL::Events::pump_events(); pass '[pump_event] ran';
-SDL::Events::poll_event($event);
+my $ret = SDL::Events::poll_event($event);
if ($event->type == SDL_ACTIVEEVENT)
{
@@
-140,6
+140,7
@@
if ($event->type == SDL_ACTIVEEVENT)
last;
}
+last if ($ret == 0 );
}
is( $got_event, 1, '[poll_event] Got the right event back out') ;