mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Fix AnalogCalibrationScreen
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user