Qt: mInputMapHat returns a mask, not a single key (fixes #2800)

This commit is contained in:
Vicki Pfau 2023-01-26 15:32:00 -08:00
parent 1dedd1d7a7
commit 0cfec878c8
1 changed files with 1 additions and 4 deletions

View File

@ -66,10 +66,7 @@ int InputMapper::mapAxes(QList<int16_t> axes) const {
int InputMapper::mapHats(QList<GamepadHatEvent::Direction> hats) const {
int platformKeys = 0;
for (int i = 0; i < hats.count(); ++i) {
int platformKey = mInputMapHat(m_map, m_type, i, hats[i]);
if (platformKey >= 0) {
platformKeys |= 1 << platformKey;
}
platformKeys |= mInputMapHat(m_map, m_type, i, hats[i]);
}
return platformKeys;
}