mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-22 18:02:05 +00:00
TWINE: only reset pressedKey member if the custom action is done
This commit is contained in:
parent
53858b559e
commit
4900ee4fcf
@ -937,9 +937,6 @@ void TwinEEngine::readKeys() {
|
|||||||
_keyboard.actionStates[event.customType] = true;
|
_keyboard.actionStates[event.customType] = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Common::EVENT_KEYUP:
|
|
||||||
_keyboard.pressedKey = 0;
|
|
||||||
break;
|
|
||||||
case Common::EVENT_LBUTTONDOWN:
|
case Common::EVENT_LBUTTONDOWN:
|
||||||
leftMouse = 1;
|
leftMouse = 1;
|
||||||
break;
|
break;
|
||||||
@ -957,7 +954,11 @@ void TwinEEngine::readKeys() {
|
|||||||
for (int i = 0; i < ARRAYSIZE(pressedKeyCharMap); i++) {
|
for (int i = 0; i < ARRAYSIZE(pressedKeyCharMap); i++) {
|
||||||
if (pressedKeyCharMap[i].key == localKey) {
|
if (pressedKeyCharMap[i].key == localKey) {
|
||||||
if (pressedKeyCharMap[i].pressed) {
|
if (pressedKeyCharMap[i].pressed) {
|
||||||
_keyboard.pressedKey |= pressedKeyCharMap[i].high;
|
if (event.type == Common::EVENT_CUSTOM_ENGINE_ACTION_END) {
|
||||||
|
_keyboard.pressedKey &= ~pressedKeyCharMap[i].high;
|
||||||
|
} else {
|
||||||
|
_keyboard.pressedKey |= pressedKeyCharMap[i].high;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
_keyboard.skippedKey |= pressedKeyCharMap[i].high;
|
_keyboard.skippedKey |= pressedKeyCharMap[i].high;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user