mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-13 20:38:26 -05:00
input_common: Move button names to the frontend
This commit is contained in:
@ -61,6 +61,7 @@ void MappingFactory::RegisterButton(const MappingData& data) {
|
||||
}
|
||||
new_input.Set("port", static_cast<int>(data.pad.port));
|
||||
new_input.Set("pad", static_cast<int>(data.pad.pad));
|
||||
|
||||
switch (data.type) {
|
||||
case EngineInputType::Button:
|
||||
// Workaround for old compatibility
|
||||
@ -75,6 +76,10 @@ void MappingFactory::RegisterButton(const MappingData& data) {
|
||||
new_input.Set("direction", data.hat_name);
|
||||
break;
|
||||
case EngineInputType::Analog:
|
||||
// Ignore mouse axis when mapping buttons
|
||||
if (data.engine == "mouse") {
|
||||
return;
|
||||
}
|
||||
new_input.Set("axis", data.index);
|
||||
new_input.Set("threshold", 0.5f);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user