v2.2.1: fixed various issues with iOS gestures (actually hopefully)

This commit is contained in:
Evan Debenham
2023-10-22 17:12:36 -04:00
parent e0d703dc58
commit e4b8f3107f
2 changed files with 8 additions and 1 deletions

View File

@@ -103,6 +103,10 @@ public class InputHandler extends InputAdapter {
@Override
public synchronized boolean touchDown(int screenX, int screenY, int pointer, int button) {
if (screenX < 0 || screenX > Game.width || screenY < 0 || screenY > Game.height){
return true;
}
if (pointer != ControllerHandler.CONTROLLER_POINTER_ID) {
ControllerHandler.setControllerPointer(false);
ControllerHandler.controllerActive = false;
@@ -118,6 +122,9 @@ public class InputHandler extends InputAdapter {
@Override
public synchronized boolean touchUp(int screenX, int screenY, int pointer, int button) {
if (screenX < 0 || screenX > Game.width || screenY < 0 || screenY > Game.height){
return true;
}
if (button >= 3 && KeyBindings.isKeyBound( button + 1000 )) {
KeyEvent.addKeyEvent( new KeyEvent( button + 1000, false ) );