aboutsummaryrefslogtreecommitdiff
path: root/src/GlobalHotkeys/GlobalHotkeysJoystick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GlobalHotkeys/GlobalHotkeysJoystick.cpp')
-rw-r--r--src/GlobalHotkeys/GlobalHotkeysJoystick.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/GlobalHotkeys/GlobalHotkeysJoystick.cpp b/src/GlobalHotkeys/GlobalHotkeysJoystick.cpp
index 23f8a20..5969438 100644
--- a/src/GlobalHotkeys/GlobalHotkeysJoystick.cpp
+++ b/src/GlobalHotkeys/GlobalHotkeysJoystick.cpp
@@ -11,6 +11,8 @@ namespace gsr {
static constexpr int triangle_button = 2;
static constexpr int options_button = 9;
static constexpr int playstation_button = 10;
+ static constexpr int l3_button = 11;
+ static constexpr int r3_button = 12;
static constexpr int axis_up_down = 7;
static constexpr int axis_left_right = 6;
@@ -266,7 +268,8 @@ namespace gsr {
if((event.type & JS_EVENT_BUTTON) == JS_EVENT_BUTTON) {
switch(event.number) {
case playstation_button: {
- playstation_button_pressed = event.value == button_pressed;
+ // Workaround weird steam input (in-game) behavior where steam triggers playstation button + options when pressing both l3 and r3 at the same time
+ playstation_button_pressed = (event.value == button_pressed) && !l3_button_pressed && !r3_button_pressed;
break;
}
case options_button: {
@@ -284,6 +287,14 @@ namespace gsr {
save_10_min_replay = true;
break;
}
+ case l3_button: {
+ l3_button_pressed = event.value == button_pressed;
+ break;
+ }
+ case r3_button: {
+ r3_button_pressed = event.value == button_pressed;
+ break;
+ }
}
} else if((event.type & JS_EVENT_AXIS) == JS_EVENT_AXIS && playstation_button_pressed) {
const int trigger_threshold = 16383;