瀏覽代碼

Use enum constants instead of integer ID's

James Khan 6 年之前
父節點
當前提交
d3be2f332f
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      jme3-core/src/main/java/com/jme3/input/InputManager.java

+ 3 - 3
jme3-core/src/main/java/com/jme3/input/InputManager.java

@@ -995,11 +995,11 @@ public class InputManager implements RawInputListener {
      * Called when a joystick has been added or removed.
      * This should only be called internally.
      * @param joystickId the ID of the joystick.
-     * @param event      the event that occured (connected / disconnected).
+     * @param state      the state that occured (connected / disconnected).
      */
-    public void fireJoystickConnectionEvent(int joystickId, int event) {
+    public void fireJoystickConnectionEvent(int joystickId, JoystickState state) {
         for (JoystickConnectionListener listener : joystickConnectionListeners) {
-            listener.connectionChanged(joystickId, JoystickState.fromCode(event));
+            listener.connectionChanged(joystickId, state);
         }
     }