diff options
| author | 2021-11-21 14:12:01 -0600 | |
|---|---|---|
| committer | 2021-11-24 20:30:28 -0600 | |
| commit | 746c85b56011b87afb57e37b75953435389fc810 (patch) | |
| tree | 32d31216be1450b5fbe9897e15829ff9bc1f1e7c /src/input_common/drivers/mouse.cpp | |
| parent | input_common: Fix SDL controller with inverted axis (diff) | |
| download | yuzu-746c85b56011b87afb57e37b75953435389fc810.tar.gz yuzu-746c85b56011b87afb57e37b75953435389fc810.tar.xz yuzu-746c85b56011b87afb57e37b75953435389fc810.zip | |
input_common: Move button names to the frontend
Diffstat (limited to 'src/input_common/drivers/mouse.cpp')
| -rw-r--r-- | src/input_common/drivers/mouse.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/input_common/drivers/mouse.cpp b/src/input_common/drivers/mouse.cpp index 9a9a1987d..752118e97 100644 --- a/src/input_common/drivers/mouse.cpp +++ b/src/input_common/drivers/mouse.cpp | |||
| @@ -171,12 +171,15 @@ AnalogMapping Mouse::GetAnalogMappingForDevice( | |||
| 171 | return mapping; | 171 | return mapping; |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | std::string Mouse::GetUIName(const Common::ParamPackage& params) const { | 174 | Common::Input::ButtonNames Mouse::GetUIName(const Common::ParamPackage& params) const { |
| 175 | if (params.Has("button")) { | 175 | if (params.Has("button")) { |
| 176 | return fmt::format("Mouse {}", params.Get("button", 0)); | 176 | return Common::Input::ButtonNames::Value; |
| 177 | } | ||
| 178 | if (params.Has("axis")) { | ||
| 179 | return Common::Input::ButtonNames::Value; | ||
| 177 | } | 180 | } |
| 178 | 181 | ||
| 179 | return "Bad Mouse"; | 182 | return Common::Input::ButtonNames::Invalid; |
| 180 | } | 183 | } |
| 181 | 184 | ||
| 182 | } // namespace InputCommon | 185 | } // namespace InputCommon |