Files
0ad/source/ps
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
..
2013-10-06 05:15:54 +00:00
2013-10-18 15:53:07 +00:00
…
2012-01-31 00:06:56 +00:00
2012-01-30 06:21:11 +00:00
…
…
2013-01-01 18:33:53 +00:00
…
2012-01-15 21:48:41 +00:00
2013-04-05 02:39:30 +00:00
2012-02-06 22:47:35 +00:00
…
…
2013-04-05 02:39:30 +00:00
2012-02-25 17:29:27 +00:00
2013-01-01 18:33:53 +00:00
2012-02-15 13:58:58 +00:00
…
2012-02-06 22:47:35 +00:00