This is mnoGoSearch's cache of https://lists.gambas-basic.org/pipermail/devel/2011-April/004893.html. It is a snapshot of the page as it appeared during last crawling. The current page could have changed in the meantime.

Last modified: Mon, 18 Apr 2011, 09:54:11 CEST    Size: 4474
[Gambas-devel] Wait statement changes in recent revision

[Gambas-devel] Wait statement changes in recent revision

Laurent Carlier lordheavym at ...176...
Mon Apr 18 09:54:11 CEST 2011


Le lundi 18 avril 2011 09:13:16, Kevin Fishburne a écrit :
> 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?

The behaviour of Wait has changed, in fact, it's fixed now to work properly, as 
specified in the wiki doc see http://gambasdoc.org/help/lang/wait?v3

Regards,




More information about the Devel mailing list