diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-03-20 19:22:16 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-03-20 19:22:16 +0100 |
commit | a0d8af9d372ac3847cbae9dc9c647abf57227e3c (patch) | |
tree | a9bf3be57410b3d2202ff28b24ffa209c08800b4 /src/Overlay.cpp | |
parent | 71b6c395ca868a3c138585d05bcb72041c294cb3 (diff) |
Add controller hotkey to show/hide ui
Diffstat (limited to 'src/Overlay.cpp')
-rw-r--r-- | src/Overlay.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Overlay.cpp b/src/Overlay.cpp index 63f9822..0be7375 100644 --- a/src/Overlay.cpp +++ b/src/Overlay.cpp @@ -272,7 +272,7 @@ namespace gsr { static void bind_linux_hotkeys(GlobalHotkeysLinux *global_hotkeys, Overlay *overlay) { global_hotkeys->bind_key_press( config_hotkey_to_hotkey(overlay->get_config().main_config.show_hide_hotkey), - "show_hide", [overlay](const std::string &id) { + "toggle_show", [overlay](const std::string &id) { fprintf(stderr, "pressed %s\n", id.c_str()); overlay->toggle_show(); }); @@ -334,6 +334,11 @@ namespace gsr { if(!global_hotkeys_js->start()) fprintf(stderr, "Warning: failed to start joystick hotkeys\n"); + global_hotkeys_js->bind_action("toggle_show", [overlay](const std::string &id) { + fprintf(stderr, "pressed %s\n", id.c_str()); + overlay->toggle_show(); + }); + global_hotkeys_js->bind_action("save_replay", [overlay](const std::string &id) { fprintf(stderr, "pressed %s\n", id.c_str()); overlay->save_replay(); |