Hi
Looking at the man pages, I found 2 basic ways of
handling events.
One is PollEvent, the other is WaitEvent (PeepEvents
is too complex).
what is better for my SDL application? Use WaitEvent
or use PollEvent and create a code for make my app
runs util user press quit?
thanks for any help,
J Inacio
Mit sch?nen Gr??en von Yahoo! Mail - http://mail.yahoo.de
Either will work.
It really depends on if you want your app to do anything ELSE while waiting!
;^)
99% of the time, I use PollEvent, since my game is busy animating and
moving baddies and such.
I’ve used WaitEvents for cases where I just have a yes/no prompt, and
all I’m waiting for is a keypress or mouse click, and don’t have anything
else interesting going on.
(Of course, you can also use WaitEvents, and then set a timer to push
new events into the app every Xth-of-a-second, so it will 'wake up’
all the time.)
It really all depends on what you need. ;^) How’s that for an answer?
-bill!
bill at newbreedsoftware.com Check out the new, improved Tux Paint site!
http://newbreedsoftware.com/bill/ http://newbreedsoftware.com/tuxpaint/On Sat, Mar 20, 2004 at 02:05:55AM +0100, Dark Kernel (InacioW-) wrote:
One is PollEvent, the other is WaitEvent (PeepEvents
is too complex).
what is better for my SDL application? Use WaitEvent
or use PollEvent and create a code for make my app
runs util user press quit?