From c7080e5d99bf77e432e6c900e64489b78a233f28 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 30 Mar 2025 22:30:47 +0200 Subject: Revert "Add high performance encoding option (for amd) in settings page. Requires gsr version >= 5.3.4" This reverts commit 3060e3ee000ddb12a78d8008f641b724ce7b07df. --- tools/gsr-global-hotkeys/keyboard_event.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tools/gsr-global-hotkeys/keyboard_event.c') diff --git a/tools/gsr-global-hotkeys/keyboard_event.c b/tools/gsr-global-hotkeys/keyboard_event.c index 9a92b56..c2bd75a 100644 --- a/tools/gsr-global-hotkeys/keyboard_event.c +++ b/tools/gsr-global-hotkeys/keyboard_event.c @@ -120,13 +120,14 @@ static void keyboard_event_process_key_state_change(keyboard_event *self, const /* Return true if a global hotkey is assigned to the key combination */ static bool keyboard_event_on_key_pressed(keyboard_event *self, const struct input_event *event, uint32_t modifiers) { + if(event->value != KEYBOARD_BUTTON_PRESSED) + return false; + bool global_hotkey_match = false; for(int i = 0; i < self->num_global_hotkeys; ++i) { if(event->code == self->global_hotkeys[i].key && modifiers == self->global_hotkeys[i].modifiers) { - if(event->value == KEYBOARD_BUTTON_PRESSED) { - puts(self->global_hotkeys[i].action); - fflush(stdout); - } + puts(self->global_hotkeys[i].action); + fflush(stdout); global_hotkey_match = true; } } -- cgit v1.2.3-70-g09d2