So far I've always used an if statement in my event polling routine, but a couple of people on #gp2xdev strongly advised me to make it be a while statement to poll all the events in queue before going on with the program.
While it makes sense to me, I can see a problem with it, you could have key presses being ignored because their release would be pulled out of the event queue right after the press event and thus not get to meet the code destinated to handle that key press.
What do you guys think about that and how do you handle it most of the time?
While it makes sense to me, I can see a problem with it, you could have key presses being ignored because their release would be pulled out of the event queue right after the press event and thus not get to meet the code destinated to handle that key press.
What do you guys think about that and how do you handle it most of the time?