From e403bab275e3c403fef51031200eb421c2ceedc0 Mon Sep 17 00:00:00 2001 From: alexytomi <60690056+alexytomi@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:30:27 +0800 Subject: [PATCH] fix: Legacy4J GLFW controller enable Legacy4J previously was not being detected by the GLFW implementation as a mod that was using GLFW controllers, thus leading it to use vanilla keyboard+mouse emulation. This fixes that. This is still kinda bugged on L4J settings menu but this only applies when outside of a world. I can't figure out why L4J does this only on their menus, I probably wont either, SDL doesn't have this. --- jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java | 6 ++++-- 1 file changed, 4 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 d4b43656b..4abc22a6f 100644 --- a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java +++ b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java @@ -1269,8 +1269,10 @@ public class GLFW }else return null; } public static boolean glfwJoystickIsGamepad(int jid) { - if(jid == GLFW_JOYSTICK_1) return true; - else return false; + if(jid == GLFW_JOYSTICK_1) { + CallbackBridge.enableGamepadDirectInput(); + return true; + }else return false; } public static String glfwGetJoystickGUID(int jid) { // Return Xbox 360 controller GUID