File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 3737import static org .lwjgl .opencl .CL10 .CL_CONTEXT_PLATFORM ;
3838import static org .lwjgl .opengl .GL .createCapabilities ;
3939import static org .lwjgl .opengl .GL11 .glGetInteger ;
40+
41+ import com .jme3 .input .JoystickState ;
4042import com .jme3 .input .lwjgl .GlfwJoystickInput ;
4143import com .jme3 .input .lwjgl .GlfwKeyInput ;
4244import com .jme3 .input .lwjgl .GlfwMouseInput ;
@@ -238,7 +240,12 @@ protected void initContextFirstTime() {
238240 @ Override
239241 public void invoke (int jid , int event ) {
240242 joyInput .reloadJoysticks ();
241- joyInput .fireJoystickConnectionEvent (jid , event );
243+
244+ JoystickState state = event == GLFW .GLFW_CONNECTED
245+ ? JoystickState .Connected
246+ : JoystickState .Disconnected ;
247+
248+ joyInput .fireJoystickConnectionEvent (jid , state );
242249 }
243250 });
244251
You can’t perform that action at this time.
0 commit comments