PistonDevelopers/glutin_window

A lot of mouse input seems to cause poll_event to return None when it should still have events for that frame

LaylBongers opened this issue · 4 comments

My best guess is that it's caused by this line:
https://github.com/PistonDevelopers/glutin_window/blob/master/src/lib.rs#L378

And that some event is being raised in glutin that's not being handled, causing None to be returned, which will be interpreted as no more events being left even if there still are. The result of this is that game input will lag a lot even if framerate is smooth.

It should probably be replaced by a while let Some(e) = ... { ... } loop.

I'm investigating this closer because we probably should add some more events to the Piston core.

Regardless of fixing the offending event itself being handled, it probably shouldn't be returning None on not recognizing the event regardless, right now it's causing a 1 minute (!) long delay if someone moves the mouse for just a few seconds.

OK.