diff --git a/src/main/java/org/lwjglx/input/Mouse.java b/src/main/java/org/lwjglx/input/Mouse.java index 00b6009..36e81c5 100644 --- a/src/main/java/org/lwjglx/input/Mouse.java +++ b/src/main/java/org/lwjglx/input/Mouse.java @@ -1,5 +1,8 @@ package org.lwjglx.input; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import org.lwjgl.BufferUtils; import org.lwjgl.glfw.GLFW; import org.lwjglx.LWJGLException; import org.lwjglx.Sys; @@ -7,6 +10,12 @@ import org.lwjglx.opengl.Display; public class Mouse { + // Fields for reflection compatibility with lwjgl2 + public static final int EVENT_SIZE = 1 + 1 + 4 + 4 + 4 + 8; + private static ByteBuffer buttons = BufferUtils.createByteBuffer(32); + private static IntBuffer coord_buffer = BufferUtils.createIntBuffer(32); + private static ByteBuffer readBuffer = BufferUtils.createByteBuffer(32); + private static boolean grabbed = false; private static int lastX = 0;