Manual DS4 mode: Allow Back/Select to trigger Touchpad click (#1772)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
This commit is contained in:
@@ -1174,7 +1174,7 @@ namespace platf {
|
||||
BOOST_LOG(info) << "Gamepad " << id.globalIndex << " will be Xbox 360 controller (manual selection)"sv;
|
||||
selectedGamepadType = Xbox360Wired;
|
||||
}
|
||||
else if (config::input.gamepad == "ps4"sv || config::input.gamepad == "ds4"sv) {
|
||||
else if (config::input.gamepad == "ds4"sv) {
|
||||
BOOST_LOG(info) << "Gamepad " << id.globalIndex << " will be DualShock 4 controller (manual selection)"sv;
|
||||
selectedGamepadType = DualShock4Wired;
|
||||
}
|
||||
@@ -1334,6 +1334,9 @@ namespace platf {
|
||||
// Allow either PS4/PS5 clickpad button or Xbox Series X share button to activate DS4 clickpad
|
||||
if (gamepad_state.buttonFlags & (TOUCHPAD_BUTTON | MISC_BUTTON)) buttons |= DS4_SPECIAL_BUTTON_TOUCHPAD;
|
||||
|
||||
// Manual DS4 emulation: check if BACK button should also trigger DS4 touchpad click
|
||||
if (config::input.gamepad == "ds4"sv && config::input.ds4_back_as_touchpad_click && (gamepad_state.buttonFlags & BACK)) buttons |= DS4_SPECIAL_BUTTON_TOUCHPAD;
|
||||
|
||||
return (DS4_SPECIAL_BUTTONS) buttons;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user