mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-27 14:56:36 +02:00
Don't fire single-button mappings while a combo using them is held
If you map something to L2+R2, the mappings for L2 and R2 on their own would fire as well. Now, while a combo mapping is fully held, the shorter mappings that share an input with it are suppressed - longest match wins. Releasing part of the combo brings the shorter mappings back, for the inputs that are still held. Adds a ControlMapper unit test covering the sequence. Fixes #20621 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JvJR8oJNSCimCM9KXVLjfq
This commit is contained in:
co-authored by
Claude Opus 5
parent
bdaf6dcaf4
commit
50616825da
@@ -614,6 +614,17 @@ bool InputMappingToPspButton(const InputMapping &mapping, std::vector<int> *pspB
|
||||
return found;
|
||||
}
|
||||
|
||||
void GetAllComboMappingsNoLock(std::vector<MultiInputMapping> *combos) {
|
||||
combos->clear();
|
||||
for (const auto &iter : g_controllerMap) {
|
||||
for (const auto &mapping : iter.second) {
|
||||
if (mapping.mappings.size() > 1) {
|
||||
combos->push_back(mapping);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This is the main workhorse of the ControlMapper.
|
||||
bool InputMappingsFromPspButtonNoLock(int btn, std::vector<MultiInputMapping> *mappings, bool ignoreMouse) {
|
||||
auto iter = g_controllerMap.find(btn);
|
||||
|
||||
Reference in New Issue
Block a user