From a6bd165d97b657cd51ab31aa6578513db0b47b42 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 17 Mar 2025 22:04:02 +0100 Subject: Change joystick button to save replay. Add joystick buttons for more actions. --- include/GlobalHotkeysJoystick.hpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/GlobalHotkeysJoystick.hpp b/include/GlobalHotkeysJoystick.hpp index 69f66df..7dbb272 100644 --- a/include/GlobalHotkeysJoystick.hpp +++ b/include/GlobalHotkeysJoystick.hpp @@ -3,10 +3,8 @@ #include "GlobalHotkeys.hpp" #include "Hotplug.hpp" #include -#include #include #include -#include #include namespace gsr { @@ -21,6 +19,11 @@ namespace gsr { ~GlobalHotkeysJoystick() override; bool start(); + // Currently valid ids: + // save_replay + // take_screenshot + // toggle_record + // toggle_replay bool bind_action(const std::string &id, GlobalHotkeyCallback callback) override; void poll_events() override; private: @@ -45,9 +48,12 @@ namespace gsr { int event_fd = -1; int event_index = -1; - mgl::Clock double_click_clock; - std::optional prev_time_clicked; + bool playstation_button_pressed = false; + bool save_replay = false; + bool take_screenshot = false; + bool toggle_record = false; + bool toggle_replay = false; int hotplug_poll_index = -1; Hotplug hotplug; }; -- cgit v1.2.3-70-g09d2