mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Merge pull request #18711 from hrydgard/fix-analog-speed-crash
Don't crash after mapping analog speed to a stick.
This commit is contained in:
commit
72c4d346d0
@ -553,12 +553,16 @@ bool InputMappingsFromPspButtonNoLock(int btn, std::vector<MultiInputMapping> *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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user