From 3cb420736913b9243ded73ebcf08b6d2c3970c08 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 4 Jul 2022 20:20:13 -0700 Subject: [PATCH] UI: Allow cancel from analog speed mapping. --- UI/ControlMappingScreen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 32ada96a0d..7acdd36f05 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -338,13 +338,13 @@ bool KeyMappingNewKeyDialog::key(const KeyInput &key) { return true; } // Only map analog values to this mapping. - if (pspBtn_ == VIRTKEY_SPEED_ANALOG) + if (pspBtn_ == VIRTKEY_SPEED_ANALOG && !UI::IsEscapeKey(key)) return true; mapped_ = true; KeyDef kdf(key.deviceId, key.keyCode); TriggerFinish(DR_YES); - if (callback_) + if (callback_ && pspBtn_ != VIRTKEY_SPEED_ANALOG) callback_(kdf); } return true;