Remove unused function

This commit is contained in:
Henrik Rydgård committed 2023-12-14 19:01:18 +01:00
1 parent 88b19432fe
commit b941f40b32
1 file changed
-22
-22
View File
@@ -413,25 +413,9 @@ bool KeyMappingNewMouseKeyDialog::key(const KeyInput &key) {
return true;
}
static bool IgnoreAxisForMapping(int axis) {
switch (axis) {
case JOYSTICK_AXIS_ACCELEROMETER_X:
case JOYSTICK_AXIS_ACCELEROMETER_Y:
case JOYSTICK_AXIS_ACCELEROMETER_Z:
// Ignore the accelerometer for mapping for now.
// We use tilt control for these.
return true;
default:
return false;
}
}
void KeyMappingNewKeyDialog::axis(const AxisInput &axis) {
if (time_now_d() < delayUntil_)
return;
if (IgnoreAxisForMapping(axis.axisId))
return;
if (ignoreInput_)
return;
@@ -468,8 +452,6 @@ void KeyMappingNewKeyDialog::axis(const AxisInput &axis) {
void KeyMappingNewMouseKeyDialog::axis(const AxisInput &axis) {
if (mapped_)
return;
if (IgnoreAxisForMapping(axis.axisId))
return;
if (axis.value > AXIS_BIND_THRESHOLD) {
mapped_ = true;
@@ -698,10 +680,6 @@ bool TouchTestScreen::key(const KeyInput &key) {
}
void TouchTestScreen::axis(const AxisInput &axis) {
// This just filters out accelerometer events. We show everything else.
if (IgnoreAxisForMapping(axis.axisId))
return;
char buf[512];
snprintf(buf, sizeof(buf), "Axis: %s (%d) (value %1.3f) Device ID: %d",
KeyMap::GetAxisName(axis.axisId).c_str(), axis.axisId, axis.value, axis.deviceId);