diff options
author | german77 <juangerman-13@hotmail.com> | 2021-11-16 00:57:41 +0100 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2022-01-07 04:26:05 +0100 |
commit | 72c8a94a6cdb4d3f322fa6d4b06eab824f53dba6 (patch) | |
tree | 1be3b99cfa76a7e7c360fa467d8ea6de69a29dc8 /src/input_common/drivers | |
parent | core/hid: Add home and screenshot button support (diff) | |
download | yuzu-72c8a94a6cdb4d3f322fa6d4b06eab824f53dba6.tar yuzu-72c8a94a6cdb4d3f322fa6d4b06eab824f53dba6.tar.gz yuzu-72c8a94a6cdb4d3f322fa6d4b06eab824f53dba6.tar.bz2 yuzu-72c8a94a6cdb4d3f322fa6d4b06eab824f53dba6.tar.lz yuzu-72c8a94a6cdb4d3f322fa6d4b06eab824f53dba6.tar.xz yuzu-72c8a94a6cdb4d3f322fa6d4b06eab824f53dba6.tar.zst yuzu-72c8a94a6cdb4d3f322fa6d4b06eab824f53dba6.zip |
Diffstat (limited to 'src/input_common/drivers')
-rw-r--r-- | src/input_common/drivers/sdl_driver.cpp | 2 | ||||
-rw-r--r-- | src/input_common/drivers/sdl_driver.h | 2 | ||||
-rw-r--r-- | src/input_common/drivers/tas_input.cpp | 7 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp index 0cda9df62..757117f2b 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp @@ -663,6 +663,7 @@ ButtonBindings SDLDriver::GetDefaultButtonBinding() const { {Settings::NativeButton::SL, SDL_CONTROLLER_BUTTON_LEFTSHOULDER}, {Settings::NativeButton::SR, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER}, {Settings::NativeButton::Home, SDL_CONTROLLER_BUTTON_GUIDE}, + {Settings::NativeButton::Screenshot, SDL_CONTROLLER_BUTTON_MISC1}, }; } @@ -699,6 +700,7 @@ ButtonBindings SDLDriver::GetNintendoButtonBinding( {Settings::NativeButton::SL, sl_button}, {Settings::NativeButton::SR, sr_button}, {Settings::NativeButton::Home, SDL_CONTROLLER_BUTTON_GUIDE}, + {Settings::NativeButton::Screenshot, SDL_CONTROLLER_BUTTON_MISC1}, }; } diff --git a/src/input_common/drivers/sdl_driver.h b/src/input_common/drivers/sdl_driver.h index e9a5d2e26..4cde3606f 100644 --- a/src/input_common/drivers/sdl_driver.h +++ b/src/input_common/drivers/sdl_driver.h @@ -24,7 +24,7 @@ namespace InputCommon { class SDLJoystick; using ButtonBindings = - std::array<std::pair<Settings::NativeButton::Values, SDL_GameControllerButton>, 17>; + std::array<std::pair<Settings::NativeButton::Values, SDL_GameControllerButton>, 18>; using ZButtonBindings = std::array<std::pair<Settings::NativeButton::Values, SDL_GameControllerAxis>, 2>; diff --git a/src/input_common/drivers/tas_input.cpp b/src/input_common/drivers/tas_input.cpp index 5bdd5dac3..579fd9473 100644 --- a/src/input_common/drivers/tas_input.cpp +++ b/src/input_common/drivers/tas_input.cpp @@ -23,7 +23,7 @@ enum class Tas::TasAxis : u8 { }; // Supported keywords and buttons from a TAS file -constexpr std::array<std::pair<std::string_view, TasButton>, 20> text_to_tas_button = { +constexpr std::array<std::pair<std::string_view, TasButton>, 18> text_to_tas_button = { std::pair{"KEY_A", TasButton::BUTTON_A}, {"KEY_B", TasButton::BUTTON_B}, {"KEY_X", TasButton::BUTTON_X}, @@ -40,8 +40,9 @@ constexpr std::array<std::pair<std::string_view, TasButton>, 20> text_to_tas_but {"KEY_DDOWN", TasButton::BUTTON_DOWN}, {"KEY_SL", TasButton::BUTTON_SL}, {"KEY_SR", TasButton::BUTTON_SR}, - {"KEY_CAPTURE", TasButton::BUTTON_CAPTURE}, - {"KEY_HOME", TasButton::BUTTON_HOME}, + // These buttons are disabled to avoid TAS input from activating hotkeys + // {"KEY_CAPTURE", TasButton::BUTTON_CAPTURE}, + // {"KEY_HOME", TasButton::BUTTON_HOME}, {"KEY_ZL", TasButton::TRIGGER_ZL}, {"KEY_ZR", TasButton::TRIGGER_ZR}, }; |