diff --git a/Core/KeyMap.cpp b/Core/KeyMap.cpp index f52072bb64..d9af549746 100644 --- a/Core/KeyMap.cpp +++ b/Core/KeyMap.cpp @@ -553,12 +553,16 @@ bool InputMappingsFromPspButtonNoLock(int btn, std::vector *m return false; } bool mapped = false; - mappings->clear(); + if (mappings) { + mappings->clear(); + } for (auto &iter2 : iter->second) { bool ignore = ignoreMouse && iter2.HasMouse(); - if (mappings && !ignore) { + if (!ignore) { mapped = true; - mappings->push_back(iter2); + if (mappings) { + mappings->push_back(iter2); + } } } return mapped; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 6dd0fb1d21..f1187c1467 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1527,6 +1527,7 @@ void GameSettingsScreen::dialogFinished(const Screen *dialog, DialogResult resul RecreateViews(); } + // Show/hide the Analog Alternative Speed as appropriate - need to recreate views if this changed. bool mapped = KeyMap::InputMappingsFromPspButton(VIRTKEY_SPEED_ANALOG, nullptr, true); if (mapped != analogSpeedMapped_) { analogSpeedMapped_ = mapped;