Files
0ad/source/lib
Ykkrosh 2d1be3d47e Improve correctness of hotkeys at low framerates.
SDL queues up all the input events received in a frame. When the hotkey
system saw a key up/down event, it immediately updated its
HotkeyIsPressed state and then pushed a hotkey event onto the end of the
queue.

If the initial queue was e.g. [key-down shift, key-press Z, key-up
shift], the hotkey event triggered by Z would be processed after the
key-up shift had updated the HotkeyIsPressed state, so the handler of
the Z hotkey would not think the shift hotkey was pressed.

If the initial queue was e.g. [key-press Z, mouse-click], the hotkey
triggered by Z would be processed after the mouse-click event, so it
could apply to the wrong building selection.

Fix by pushing the hotkey events onto a special queue that gets
processed before any subsequent SDL input events.

Also update the HotkeyIsPressed status when the HOTKEYDOWN/HOTKEYUP
events are processed, not when they are generated, to guarantee they are
consistent with the DOWN/UP events.

Fixes #1869.

This was SVN commit r14057.
2013-10-30 01:38:32 +00:00
..
2011-12-28 11:21:05 +00:00
2013-10-18 15:53:07 +00:00
2013-10-18 15:36:31 +00:00
2011-03-23 16:14:47 +00:00
2011-05-03 12:38:42 +00:00
2011-07-18 09:21:56 +00:00
2011-07-18 09:21:56 +00:00
2011-12-19 11:55:30 +00:00
2013-01-01 18:33:53 +00:00
2011-05-03 12:38:42 +00:00
2011-04-30 13:22:46 +00:00
2012-01-19 18:23:54 +00:00
2013-07-10 00:08:01 +00:00
2011-05-03 12:38:42 +00:00
2012-05-05 19:22:22 +00:00
2012-01-29 12:23:16 +00:00
2011-12-27 14:12:31 +00:00
2011-05-03 12:38:42 +00:00