[Gambas-devel] Wait statement changes in recent revision

Kevin Fishburne kevinfishburne at ...590...
Mon Apr 18 09:13:16 CEST 2011


Alright Benoît, what changed in the recent revision? ;)

I noticed before that supposedly recursive Wait statements were 
not-so-recursive, and that I had to call them multiple times to allow 
various events to trigger. If I had two events that had queued, for 
example, I'd have to call Wait twice per frame for each to execute. Now 
calling Wait several times seems to trigger the first event over and 
over without triggering the second. I even had a stack overflow early 
on, which I hadn't seen since my earliest days of programming. I can 
adapt to the new way of things, but I'm not sure exactly what is 
happening now. All I could think of was a GOSUB without a RETURN, haha.

Specifically the Draw event of the SDL screen executes each time Wait is 
called, without regard to queued device events from the gamepad. If the 
SDL screen Draw event takes 0.125 seconds to execute, but the gamepad 
Read event occurs 30 times per second, is it possible to call Wait 
between frames to drop the excessive gamepad input? This worked before 
but now it just queues the gamepad input for eternity, executing only 
the SDL screen refresh.

I'm thinking I need to add code to the gamepad processing procedure to 
ignore input if the rendering frame hasn't been updated since the 
previous gamepad input. Good idea, or am I missing something?

-- 
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...590...
phone: (770) 853-6271





More information about the Devel mailing list