From 75e582d0068d84941818dddb85fd8b464c6fcfeb Mon Sep 17 00:00:00 2001 From: artdeell Date: Sun, 3 Jan 2021 19:48:23 +0300 Subject: [PATCH] preinit buffers --- jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java index 7d16e1e48..63bc283fd 100644 --- a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java +++ b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java @@ -24,8 +24,8 @@ import java.util.*; public class GLFW { - static FloatBuffer joystickData; - static ByteBuffer buttonData; + static FloatBuffer joystickData = (FloatBuffer)FloatBuffer.allocate(8).flip(); + static ByteBuffer buttonData = (ByteBuffer)ByteBuffer.allocate(8).flip(); /** The major version number of the GLFW library. This is incremented when the API is changed in non-compatible ways. */ public static final int GLFW_VERSION_MAJOR = 3;