early-access version 2237

This commit is contained in:
pineappleEA
2021-11-22 07:17:44 +01:00
parent d8ed9646f4
commit e2e56152b0
10 changed files with 188 additions and 61 deletions

View File

@@ -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;