summaryrefslogtreecommitdiffstats
path: root/src/input_common/drivers/sdl_driver.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-11-16 15:13:39 +0100
committerGitHub <noreply@github.com>2023-11-16 15:13:39 +0100
commitea4c92f734fdcb26d20d1313a84d39cc95c9c575 (patch)
treec2bec0a6007751afd01fe624a003026ab9831bd1 /src/input_common/drivers/sdl_driver.cpp
parentMerge pull request #12043 from t895/disable-pip-default (diff)
parentcore: hid: Split SL and SR buttons (diff)
downloadyuzu-ea4c92f734fdcb26d20d1313a84d39cc95c9c575.tar
yuzu-ea4c92f734fdcb26d20d1313a84d39cc95c9c575.tar.gz
yuzu-ea4c92f734fdcb26d20d1313a84d39cc95c9c575.tar.bz2
yuzu-ea4c92f734fdcb26d20d1313a84d39cc95c9c575.tar.lz
yuzu-ea4c92f734fdcb26d20d1313a84d39cc95c9c575.tar.xz
yuzu-ea4c92f734fdcb26d20d1313a84d39cc95c9c575.tar.zst
yuzu-ea4c92f734fdcb26d20d1313a84d39cc95c9c575.zip
Diffstat (limited to 'src/input_common/drivers/sdl_driver.cpp')
-rw-r--r--src/input_common/drivers/sdl_driver.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp
index 66e3ae9af..78f458afe 100644
--- a/src/input_common/drivers/sdl_driver.cpp
+++ b/src/input_common/drivers/sdl_driver.cpp
@@ -828,16 +828,18 @@ ButtonMapping SDLDriver::GetButtonMappingForDevice(const Common::ParamPackage& p
ButtonBindings SDLDriver::GetDefaultButtonBinding(
const std::shared_ptr<SDLJoystick>& joystick) const {
// Default SL/SR mapping for other controllers
- auto sl_button = SDL_CONTROLLER_BUTTON_LEFTSHOULDER;
- auto sr_button = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER;
+ auto sll_button = SDL_CONTROLLER_BUTTON_LEFTSHOULDER;
+ auto srl_button = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER;
+ auto slr_button = SDL_CONTROLLER_BUTTON_LEFTSHOULDER;
+ auto srr_button = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER;
if (joystick->IsJoyconLeft()) {
- sl_button = SDL_CONTROLLER_BUTTON_PADDLE2;
- sr_button = SDL_CONTROLLER_BUTTON_PADDLE4;
+ sll_button = SDL_CONTROLLER_BUTTON_PADDLE2;
+ srl_button = SDL_CONTROLLER_BUTTON_PADDLE4;
}
if (joystick->IsJoyconRight()) {
- sl_button = SDL_CONTROLLER_BUTTON_PADDLE3;
- sr_button = SDL_CONTROLLER_BUTTON_PADDLE1;
+ slr_button = SDL_CONTROLLER_BUTTON_PADDLE3;
+ srr_button = SDL_CONTROLLER_BUTTON_PADDLE1;
}
return {
@@ -855,8 +857,10 @@ ButtonBindings SDLDriver::GetDefaultButtonBinding(
{Settings::NativeButton::DUp, SDL_CONTROLLER_BUTTON_DPAD_UP},
{Settings::NativeButton::DRight, SDL_CONTROLLER_BUTTON_DPAD_RIGHT},
{Settings::NativeButton::DDown, SDL_CONTROLLER_BUTTON_DPAD_DOWN},
- {Settings::NativeButton::SL, sl_button},
- {Settings::NativeButton::SR, sr_button},
+ {Settings::NativeButton::SLLeft, sll_button},
+ {Settings::NativeButton::SRLeft, srl_button},
+ {Settings::NativeButton::SLRight, slr_button},
+ {Settings::NativeButton::SRRight, srr_button},
{Settings::NativeButton::Home, SDL_CONTROLLER_BUTTON_GUIDE},
{Settings::NativeButton::Screenshot, SDL_CONTROLLER_BUTTON_MISC1},
};