Merge pull request #89 from AngelAuraMC/fix/l4j-glfw-controller-detection

fix: Legacy4J GLFW controller enable
This commit is contained in:
alexytomi 2025-09-12 21:08:12 +08:00 committed by GitHub
commit 07f23b938b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1269,8 +1269,10 @@ public class GLFW
}else return null; }else return null;
} }
public static boolean glfwJoystickIsGamepad(int jid) { public static boolean glfwJoystickIsGamepad(int jid) {
if(jid == GLFW_JOYSTICK_1) return true; if(jid == GLFW_JOYSTICK_1) {
else return false; CallbackBridge.enableGamepadDirectInput();
return true;
}else return false;
} }
public static String glfwGetJoystickGUID(int jid) { public static String glfwGetJoystickGUID(int jid) {
// Return Xbox 360 controller GUID // Return Xbox 360 controller GUID