GLFW: X11: Fix joystick detection before joystick init

From upstream: c01acc267a.
This commit is contained in:
Luflosi 2020-07-23 23:57:03 +02:00
parent 06b30d1cc3
commit bc61a81d7a
No known key found for this signature in database
GPG Key ID: 4E41E29EDCC345D0

3
glfw/x11_window.c vendored
View File

@ -2653,7 +2653,8 @@ _glfwDispatchX11Events(void) {
unsigned dispatched = 0; unsigned dispatched = 0;
#if defined(__linux__) #if defined(__linux__)
_glfwDetectJoystickConnectionLinux(); if (_glfw.joysticksInitialized)
_glfwDetectJoystickConnectionLinux();
#endif #endif
dispatched += dispatch_x11_queued_events(XEventsQueued(_glfw.x11.display, QueuedAfterFlush)); dispatched += dispatch_x11_queued_events(XEventsQueued(_glfw.x11.display, QueuedAfterFlush));