Don't crash after mapping analog speed to a stick.

Fixes #18689
This commit is contained in:
Henrik Rydgård committed 2024-01-16 14:32:42 +01:00
1 parent 7879ebdf6b
commit e1b1ae449b
2 files changed
+8 -3

No files matched your search

+7 -3
View File
@@ -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;