Add dummy bytebuffers to the Mouse class for mods that access them via reflection

This commit is contained in:
Raven Szewczyk committed 2023-01-22 10:46:06 +00:00
1 parent fdc0a9e1a1
commit 715072f909
1 file changed
+9
@@ -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;