Fix navigating the analog stick calibration screen with just a gamepad

This commit is contained in:
Henrik Rydgård 2021-08-22 00:13:01 +02:00
parent c151b7858b
commit c8081f7f44
2 changed files with 5 additions and 4 deletions

View File

@ -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) {

View File

@ -44,7 +44,6 @@ private:
UI::EventReturn OnDefaultMapping(UI::EventParams &params);
UI::EventReturn OnClearMapping(UI::EventParams &params);
UI::EventReturn OnAutoConfigure(UI::EventParams &params);
UI::EventReturn OnTestAnalogs(UI::EventParams &params);
virtual void dialogFinished(const Screen *dialog, DialogResult result) override;