From 976761956f5ff8a806a8547e7a1af9e4e7e3d77c Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 7 Aug 2020 09:21:13 +0200 Subject: [PATCH] Fix uninitialized repeat count in key events A new "repeat" field has been added by 3c1ed5d86c38bcbd5353b0a7e6ef5653d6c44d0d, 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 --- app/src/input_manager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/input_manager.c b/app/src/input_manager.c index 02dd9cb5..1d73980c 100644 --- a/app/src/input_manager.c +++ b/app/src/input_manager.c @@ -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;