jkuhlmann / gainput

Cross-platform C++ input library supporting gamepads, keyboard, mouse, touch
http://gainput.johanneskuhlmann.de/
MIT License
858 stars 103 forks source link

In response to issue #36 #38

Open GameOverture opened 7 years ago

GameOverture commented 7 years ago

Added an array to InputDevice that keeps track of any button that received both a 'down' and 'up' message in the same update. This array then apply itself to InputDevice's previousState_ so these inputs can be detected.

Note that I assume these input devices are manipulated using messages from the platform, specifically the Windows platform. I'm not familiar with how other platforms work in this library, but this should only affect code that uses the HandleButton(...) function (besides the additional memory footprint of one Array<> in each InputDevice