diff options
author | german77 <juangerman-13@hotmail.com> | 2021-11-21 21:12:01 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2021-11-25 03:30:28 +0100 |
commit | 746c85b56011b87afb57e37b75953435389fc810 (patch) | |
tree | 32d31216be1450b5fbe9897e15829ff9bc1f1e7c /src/input_common/drivers/sdl_driver.cpp | |
parent | input_common: Fix SDL controller with inverted axis (diff) | |
download | yuzu-746c85b56011b87afb57e37b75953435389fc810.tar yuzu-746c85b56011b87afb57e37b75953435389fc810.tar.gz yuzu-746c85b56011b87afb57e37b75953435389fc810.tar.bz2 yuzu-746c85b56011b87afb57e37b75953435389fc810.tar.lz yuzu-746c85b56011b87afb57e37b75953435389fc810.tar.xz yuzu-746c85b56011b87afb57e37b75953435389fc810.tar.zst yuzu-746c85b56011b87afb57e37b75953435389fc810.zip |
Diffstat (limited to 'src/input_common/drivers/sdl_driver.cpp')
-rw-r--r-- | src/input_common/drivers/sdl_driver.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp index d5af6c09b..90128b6cf 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp @@ -869,26 +869,25 @@ MotionMapping SDLDriver::GetMotionMappingForDevice(const Common::ParamPackage& p return mapping; } -std::string SDLDriver::GetUIName(const Common::ParamPackage& params) const { +Common::Input::ButtonNames SDLDriver::GetUIName(const Common::ParamPackage& params) const { if (params.Has("button")) { // TODO(German77): Find how to substitue the values for real button names - return fmt::format("Button {}", params.Get("button", 0)); + return Common::Input::ButtonNames::Value; } if (params.Has("hat")) { - return fmt::format("Hat {}", params.Get("direction", "")); + return Common::Input::ButtonNames::Value; } if (params.Has("axis")) { - return fmt::format("Axis {}", params.Get("axis", "")); + return Common::Input::ButtonNames::Value; } if (params.Has("axis_x") && params.Has("axis_y") && params.Has("axis_z")) { - return fmt::format("Axis {},{},{}", params.Get("axis_x", ""), params.Get("axis_y", ""), - params.Get("axis_z", "")); + return Common::Input::ButtonNames::Value; } if (params.Has("motion")) { - return "SDL motion"; + return Common::Input::ButtonNames::Engine; } - return "Bad SDL"; + return Common::Input::ButtonNames::Invalid; } std::string SDLDriver::GetHatButtonName(u8 direction_value) const { |