v2.0.2: fixed controller drag events incorrectly using separate IDs

This commit is contained in:
Evan Debenham
2023-04-10 17:09:27 -04:00
parent 1c944a0ada
commit e995af5c95
4 changed files with 29 additions and 26 deletions
@@ -64,13 +64,13 @@ public class KeyEvent {
public static synchronized void processKeyEvents(){
for (KeyEvent k : keyEvents){
if (KeyBindings.getActionForKey(k) == GameAction.LEFT_CLICK){
Game.inputHandler.emulateTouch(PointerEvent.LEFT, k.pressed);
Game.inputHandler.emulateTouch(ControllerHandler.CONTROLLER_POINTER_ID, PointerEvent.LEFT, k.pressed);
if (KeyBindings.bindingKey) keySignal.dispatch(k);
} else if (KeyBindings.getActionForKey(k) == GameAction.RIGHT_CLICK){
Game.inputHandler.emulateTouch(PointerEvent.RIGHT, k.pressed);
Game.inputHandler.emulateTouch(ControllerHandler.CONTROLLER_POINTER_ID, PointerEvent.RIGHT, k.pressed);
if (KeyBindings.bindingKey) keySignal.dispatch(k);
} else if (KeyBindings.getActionForKey(k) == GameAction.MIDDLE_CLICK){
Game.inputHandler.emulateTouch(PointerEvent.MIDDLE, k.pressed);
Game.inputHandler.emulateTouch(ControllerHandler.CONTROLLER_POINTER_ID, PointerEvent.MIDDLE, k.pressed);
if (KeyBindings.bindingKey) keySignal.dispatch(k);
} else {
keySignal.dispatch(k);