Skip to content

Commit

Permalink
Fix uninitialized repeat count in key events
Browse files Browse the repository at this point in the history
A new "repeat" field has been added by
3c1ed5d, but it was not initialized in
every code path.

As a consequence, keycodes generated by shortcuts were sent with an
undetermined value, breaking some shortcuts (especially HOME) randomly.

Fixes #1643 <#1643>
  • Loading branch information
rom1v committed Aug 7, 2020
1 parent 521f2fe commit 9767619
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/src/input_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ send_keycode(struct controller *controller, enum android_keycode keycode,
msg.type = CONTROL_MSG_TYPE_INJECT_KEYCODE;
msg.inject_keycode.keycode = keycode;
msg.inject_keycode.metastate = 0;
msg.inject_keycode.repeat = 0;

if (actions & ACTION_DOWN) {
msg.inject_keycode.action = AKEY_EVENT_ACTION_DOWN;
Expand Down

0 comments on commit 9767619

Please sign in to comment.