From c8081f7f449d78822fd1f8c57477ee4bfa4c514b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 22 Aug 2021 00:13:01 +0200 Subject: [PATCH] Fix navigating the analog stick calibration screen with just a gamepad --- UI/ControlMappingScreen.cpp | 8 +++++--- UI/ControlMappingScreen.h | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 5e83b869de..574e795ddd 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -579,15 +579,17 @@ void AnalogSetupScreen::update() { } bool AnalogSetupScreen::key(const KeyInput &key) { - // Allow testing auto-rotation + bool retval = UIScreen::key(key); + + // Allow testing auto-rotation. If it collides with UI keys, too bad. bool pauseTrigger = false; mapper_.Key(key, &pauseTrigger); if (UI::IsEscapeKey(key)) { TriggerFinish(DR_BACK); - return true; + return retval; } - return true; + return retval; } bool AnalogSetupScreen::axis(const AxisInput &axis) { diff --git a/UI/ControlMappingScreen.h b/UI/ControlMappingScreen.h index c8dc1adbe5..025d4bc40c 100644 --- a/UI/ControlMappingScreen.h +++ b/UI/ControlMappingScreen.h @@ -44,7 +44,6 @@ private: UI::EventReturn OnDefaultMapping(UI::EventParams ¶ms); UI::EventReturn OnClearMapping(UI::EventParams ¶ms); UI::EventReturn OnAutoConfigure(UI::EventParams ¶ms); - UI::EventReturn OnTestAnalogs(UI::EventParams ¶ms); virtual void dialogFinished(const Screen *dialog, DialogResult result) override;