aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/platform/android/peripherals/AndroidJoystickState.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/xbmc/platform/android/peripherals/AndroidJoystickState.cpp b/xbmc/platform/android/peripherals/AndroidJoystickState.cpp
index 9e622d4d73..3b1099dd3b 100644
--- a/xbmc/platform/android/peripherals/AndroidJoystickState.cpp
+++ b/xbmc/platform/android/peripherals/AndroidJoystickState.cpp
@@ -469,6 +469,10 @@ bool CAndroidJoystickState::MapButton(JOYSTICK::IButtonMap& buttonMap, int butto
if (controllerButton.empty())
return false;
+ // Check if feature is already mapped
+ if (buttonMap.GetFeatureType(controllerButton) != JOYSTICK::FEATURE_TYPE::UNKNOWN)
+ return false;
+
// Map the button
CLog::Log(LOGDEBUG, "Automatically mapping {} to {}", controllerButton,
buttonPrimitive.ToString());