aboutsummaryrefslogtreecommitdiff
path: root/include/GlobalHotkeysJoystick.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-01-23 21:49:07 +0100
committerdec05eba <dec05eba@protonmail.com>2025-01-23 21:49:07 +0100
commit5b84d7421f44c8bc00999071f2b3d46d238a9946 (patch)
treeb4cfc25421b4935dd55a5b191a83a6b04b2132ed /include/GlobalHotkeysJoystick.hpp
parent1d9d4d6398e989d0628cb4dab0273293b79b4816 (diff)
Fix controller double click not working sometimes1.1.0
Diffstat (limited to 'include/GlobalHotkeysJoystick.hpp')
-rw-r--r--include/GlobalHotkeysJoystick.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/GlobalHotkeysJoystick.hpp b/include/GlobalHotkeysJoystick.hpp
index 367de18..69f66df 100644
--- a/include/GlobalHotkeysJoystick.hpp
+++ b/include/GlobalHotkeysJoystick.hpp
@@ -3,6 +3,7 @@
#include "GlobalHotkeys.hpp"
#include "Hotplug.hpp"
#include <unordered_map>
+#include <optional>
#include <thread>
#include <poll.h>
#include <mglpp/system/Clock.hpp>
@@ -45,7 +46,7 @@ namespace gsr {
int event_index = -1;
mgl::Clock double_click_clock;
- int num_times_clicked = 0;
+ std::optional<double> prev_time_clicked;
bool save_replay = false;
int hotplug_poll_index = -1;
Hotplug hotplug;