Skip to content

Commit d3be2f3

Browse files
committed
Use enum constants instead of integer ID's
1 parent 76fcc2c commit d3be2f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -995,11 +995,11 @@ public void clearJoystickConnectionListeners() {
995995
* Called when a joystick has been added or removed.
996996
* This should only be called internally.
997997
* @param joystickId the ID of the joystick.
998-
* @param event the event that occured (connected / disconnected).
998+
* @param state the state that occured (connected / disconnected).
999999
*/
1000-
public void fireJoystickConnectionEvent(int joystickId, int event) {
1000+
public void fireJoystickConnectionEvent(int joystickId, JoystickState state) {
10011001
for (JoystickConnectionListener listener : joystickConnectionListeners) {
1002-
listener.connectionChanged(joystickId, JoystickState.fromCode(event));
1002+
listener.connectionChanged(joystickId, state);
10031003
}
10041004
}
10051005

0 commit comments

Comments
 (0)