X11: Fix joystick detection before joystick init

Spotted by @Luflosi.
This commit is contained in:
Camilla Löwy 2020-07-23 21:14:36 +02:00
parent e0f7ce402b
commit c01acc267a

View File

@ -2776,7 +2776,8 @@ void _glfwPlatformPollEvents(void)
_GLFWwindow* window;
#if defined(__linux__)
_glfwDetectJoystickConnectionLinux();
if (_glfw.joysticksInitialized)
_glfwDetectJoystickConnectionLinux();
#endif
XPending(_glfw.x11.display);