aboutsummaryrefslogtreecommitdiff
path: root/src/GlobalHotkeysJoystick.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-01-24 00:42:33 +0100
committerdec05eba <dec05eba@protonmail.com>2025-01-24 00:42:33 +0100
commitf036fcbc0ff56dbab185d42c40f748e9c097bf22 (patch)
tree69eef4cacfae906c7866a3180d361b318408d83f /src/GlobalHotkeysJoystick.cpp
parent5b84d7421f44c8bc00999071f2b3d46d238a9946 (diff)
Add 'restart replay on save' option
Diffstat (limited to 'src/GlobalHotkeysJoystick.cpp')
-rw-r--r--src/GlobalHotkeysJoystick.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/GlobalHotkeysJoystick.cpp b/src/GlobalHotkeysJoystick.cpp
index b79e799..dfe1e6f 100644
--- a/src/GlobalHotkeysJoystick.cpp
+++ b/src/GlobalHotkeysJoystick.cpp
@@ -84,6 +84,8 @@ namespace gsr {
}
bool GlobalHotkeysJoystick::bind_action(const std::string &id, GlobalHotkeyCallback callback) {
+ if(num_poll_fd == 0)
+ return false;
return bound_actions_by_id.insert(std::make_pair(id, std::move(callback))).second;
}