Fix AnalogCalibrationScreen

This commit is contained in:
Henrik Rydgård
2026-06-22 23:27:17 +02:00
parent 0840e292ab
commit b01812e671
3 changed files with 5 additions and 18 deletions
-16
View File
@@ -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 {
+4 -1
View File
@@ -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:
+1 -1
View File
@@ -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<int> pspButtons;
bool mappingFound = KeyMap::InputMappingToPspButton(mapping, &pspButtons);