MegaGlest / megaglest-source

MegaGlest real-time strategy game engine (cross-platform, 3-d)
http://megaglest.org/
348 stars 89 forks source link

Fullscreen/Windowed mode toggling: Problems with keyboard input. #138

Closed titiger closed 7 years ago

titiger commented 7 years ago

In newer Linux versions the fullscreen/window toggling is much too fast when you use the hotkey alt+enter. A maybe related problem is the "R" key when rotating a building before placing. This rotates much too fast for some people .

titiger commented 7 years ago

It turned out that those system throw "key down" and "key up" events all the time while a key is pressed.

titiger commented 7 years ago

Somehow newer SDL versions give several key down events for one alt+enter. This is fixed now using a timer ( 100 ms ) to skip those events.