diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-01-24 00:42:33 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-01-24 00:42:33 +0100 |
commit | f036fcbc0ff56dbab185d42c40f748e9c097bf22 (patch) | |
tree | 69eef4cacfae906c7866a3180d361b318408d83f /src/GlobalHotkeysLinux.cpp | |
parent | 5b84d7421f44c8bc00999071f2b3d46d238a9946 (diff) |
Add 'restart replay on save' option
Diffstat (limited to 'src/GlobalHotkeysLinux.cpp')
-rw-r--r-- | src/GlobalHotkeysLinux.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/GlobalHotkeysLinux.cpp b/src/GlobalHotkeysLinux.cpp index c779777..357fb16 100644 --- a/src/GlobalHotkeysLinux.cpp +++ b/src/GlobalHotkeysLinux.cpp @@ -166,6 +166,9 @@ namespace gsr { } bool GlobalHotkeysLinux::bind_key_press(Hotkey hotkey, const std::string &id, GlobalHotkeyCallback callback) { + if(process_id <= 0) + return false; + if(bound_actions_by_id.find(id) != bound_actions_by_id.end()) return false; @@ -202,6 +205,9 @@ namespace gsr { } void GlobalHotkeysLinux::unbind_all_keys() { + if(process_id <= 0) + return; + if(bound_actions_by_id.empty()) return; |