Переглянути джерело

Removed a TODO note and added key count implementation (rough for now).

Daniel Johansson 10 роки тому
батько
коміт
b68035570d

+ 0 - 2
jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwJoystickInput.java

@@ -64,8 +64,6 @@ public class GlfwJoystickInput implements JoyInput {
 
     @Override
     public Joystick[] loadJoysticks(final InputManager inputManager) {
-        // TODO: Implement
-
         for (int i = 0; i < GLFW_JOYSTICK_LAST; i++) {
             if (glfwJoystickPresent(i) == GL11.GL_TRUE) {
                 final String name = glfwGetJoystickName(i);

+ 2 - 1
jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwKeyInput.java

@@ -80,7 +80,8 @@ public class GlfwKeyInput implements KeyInput {
     }
 
     public int getKeyCount() {
-        return 0; // TODO: How do we figure this out?
+        // This might not be correct
+        return GLFW_KEY_LAST - GLFW_KEY_SPACE;
     }
 
     public void update() {