mirror of https://github.com/mgba-emu/mgba.git
Qt: mInputMapHat returns a mask, not a single key (fixes #2800)
This commit is contained in:
parent
1dedd1d7a7
commit
0cfec878c8
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue