diff options
Diffstat (limited to '')
| -rw-r--r-- | src/input_common/input_mapping.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input_common/input_mapping.cpp b/src/input_common/input_mapping.cpp index 0eeeff372..c5218f2cb 100644 --- a/src/input_common/input_mapping.cpp +++ b/src/input_common/input_mapping.cpp | |||
| @@ -61,6 +61,7 @@ void MappingFactory::RegisterButton(const MappingData& data) { | |||
| 61 | } | 61 | } |
| 62 | new_input.Set("port", static_cast<int>(data.pad.port)); | 62 | new_input.Set("port", static_cast<int>(data.pad.port)); |
| 63 | new_input.Set("pad", static_cast<int>(data.pad.pad)); | 63 | new_input.Set("pad", static_cast<int>(data.pad.pad)); |
| 64 | |||
| 64 | switch (data.type) { | 65 | switch (data.type) { |
| 65 | case EngineInputType::Button: | 66 | case EngineInputType::Button: |
| 66 | // Workaround for old compatibility | 67 | // Workaround for old compatibility |
| @@ -75,6 +76,10 @@ void MappingFactory::RegisterButton(const MappingData& data) { | |||
| 75 | new_input.Set("direction", data.hat_name); | 76 | new_input.Set("direction", data.hat_name); |
| 76 | break; | 77 | break; |
| 77 | case EngineInputType::Analog: | 78 | case EngineInputType::Analog: |
| 79 | // Ignore mouse axis when mapping buttons | ||
| 80 | if (data.engine == "mouse") { | ||
| 81 | return; | ||
| 82 | } | ||
| 78 | new_input.Set("axis", data.index); | 83 | new_input.Set("axis", data.index); |
| 79 | new_input.Set("threshold", 0.5f); | 84 | new_input.Set("threshold", 0.5f); |
| 80 | break; | 85 | break; |