From e896229e45328fce724eb90e2ef2683a6b2e6d0a Mon Sep 17 00:00:00 2001 From: SerpentSpirale Date: Sat, 4 Dec 2021 14:31:44 +0100 Subject: [PATCH] Fix scroll crashing 1.13+ Fix secondary pointers not affecting the touchbar --- .../src/main/java/net/kdt/pojavlaunch/MinecraftGLView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MinecraftGLView.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MinecraftGLView.java index 515e3c920..a45d6b135 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MinecraftGLView.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MinecraftGLView.java @@ -340,11 +340,13 @@ public class MinecraftGLView extends TextureView { break; case MotionEvent.ACTION_POINTER_DOWN: // 5 + //TODO Hey we could have some sort of middle click detection ? + scrollLastInitialX = e.getX(); scrollLastInitialY = e.getY(); //Checking if we are pressing the hotbar to select the item hudKeyHandled = handleGuiBar((int)e.getX(e.getPointerCount()-1), (int) e.getY(e.getPointerCount()-1)); - if(hudKeyHandled == -1){ + if(hudKeyHandled != -1){ sendKeyPress(hudKeyHandled); if(hasDoubleTapped && hudKeyHandled == lastHotbarKey){ //Prevent double tapping Event on two different slots