From 5f2954bc69c9aacf8387b0823af534b73fbfd0c4 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Mon, 6 Jan 2014 23:58:59 +0100 Subject: [PATCH] Prevent the accelerometer from being mapped to controls directly until we can create sane UI for that. --- UI/ControlMappingScreen.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 015222c1a5..1b602eb1e3 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -264,6 +264,16 @@ void KeyMappingNewKeyDialog::key(const KeyInput &key) { } void KeyMappingNewKeyDialog::axis(const AxisInput &axis) { + // Ignore the accelerometer for mapping for now. + switch (axis.axisId) { + case JOYSTICK_AXIS_ACCELEROMETER_X: + case JOYSTICK_AXIS_ACCELEROMETER_Y: + case JOYSTICK_AXIS_ACCELEROMETER_Z: + return; + default: + ; + } + if (axis.value > AXIS_BIND_THRESHOLD) { KeyDef kdf(axis.deviceId, KeyMap::TranslateKeyCodeFromAxis(axis.axisId, 1)); screenManager()->finishDialog(this, DR_OK);