diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 3e730cfa94..d4993ee9b4 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -514,25 +514,9 @@ void AnalogCalibrationScreen::update() { UIScreen::update(); } -bool AnalogCalibrationScreen::key(const KeyInput &key) { - bool retval = UIScreen::key(key); - - // Allow testing auto-rotation. If it collides with UI keys, too bad. - g_controlMapper.Key(key); - - if (UI::IsEscapeKey(key)) { - TriggerFinish(DR_BACK); - return retval; - } - return retval; -} - void AnalogCalibrationScreen::axis(const AxisInput &axis) { // We DON'T call UIScreen::Axis here! Otherwise it'll try to move the UI focus around. // UIScreen::axis(axis); - - // Instead we just send the input directly to the mapper, that we'll visualize. - g_controlMapper.Axis(&axis, 1); } std::string_view AnalogCalibrationScreen::GetTitle() const { diff --git a/UI/ControlMappingScreen.h b/UI/ControlMappingScreen.h index 0125e4ed07..da71b0af37 100644 --- a/UI/ControlMappingScreen.h +++ b/UI/ControlMappingScreen.h @@ -130,11 +130,14 @@ public: AnalogCalibrationScreen(const Path &gamePath); ~AnalogCalibrationScreen(); - bool key(const KeyInput &key) override; void axis(const AxisInput &axis) override; void update() override; + InputMode PassInputToMapper() const { + return InputMode::Other | InputMode::Keyboard | InputMode::Mouse; + } + const char *tag() const override { return "AnalogSetup"; } protected: diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 576fa113c2..baa14fa127 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -1443,7 +1443,7 @@ bool NativeKey(const KeyInput &key) { InputMode inputMode = g_screenManager->PassInputToMapper(); bool passKeyThrough = false; if (inputMode != InputMode::None) { - if (key.flags & (KeyInputFlags::UP | KeyInputFlags::DOWN)) { + if ((inputMode & InputMode::ImDebuggerToggle) && (key.flags & (KeyInputFlags::UP | KeyInputFlags::DOWN))) { InputMapping mapping(key.deviceId, key.keyCode); std::vector pspButtons; bool mappingFound = KeyMap::InputMappingToPspButton(mapping, &pspButtons);