Update Application?

BlitzMax Forums/BlitzMax Programming/Update Application?

BLaBZ(Posted 2010) [#1]
I have a really long Repeat loop and windows occasionally reads the program as "unresponsive"

Is there some sort of function I could put in the loop that basically says "hey! Im still alive!"


ima747(Posted 2010) [#2]
while(PollEvent())
Wend
works for me to let the application process events (such as window going to the front or back, etc.) which if the OS pokes it it will have a chance to say it's awake during that time. It will clear the event loop, but chances are you don't want any events to be processed anyway if you've got a long pause like that...


Oddball(Posted 2010) [#3]
Wouldn't a PollSystem() call do the same job as you're empty PollEvent() loop? Except of course with the added bonus of not emptying the event queue.


Czar Flavius(Posted 2010) [#4]
How many milliseconds does the loop take to complete?

Put Delay 1 in your main game loop, this gives control back to the system momentarily.