forked from eden-emu/eden
input_common: Move button names to the frontend
This commit is contained in:
parent
c4760489a0
commit
746c85b560
12 changed files with 160 additions and 52 deletions
|
@ -171,12 +171,15 @@ AnalogMapping Mouse::GetAnalogMappingForDevice(
|
|||
return mapping;
|
||||
}
|
||||
|
||||
std::string Mouse::GetUIName(const Common::ParamPackage& params) const {
|
||||
Common::Input::ButtonNames Mouse::GetUIName(const Common::ParamPackage& params) const {
|
||||
if (params.Has("button")) {
|
||||
return fmt::format("Mouse {}", params.Get("button", 0));
|
||||
return Common::Input::ButtonNames::Value;
|
||||
}
|
||||
if (params.Has("axis")) {
|
||||
return Common::Input::ButtonNames::Value;
|
||||
}
|
||||
|
||||
return "Bad Mouse";
|
||||
return Common::Input::ButtonNames::Invalid;
|
||||
}
|
||||
|
||||
} // namespace InputCommon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue