From c01acc267ad7f5e016d905276ba38917a1fa64bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 23 Jul 2020 21:14:36 +0200 Subject: [PATCH] X11: Fix joystick detection before joystick init Spotted by @Luflosi. --- src/x11_window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/x11_window.c b/src/x11_window.c index 76f1483e..4cd32940 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -2776,7 +2776,8 @@ void _glfwPlatformPollEvents(void) _GLFWwindow* window; #if defined(__linux__) - _glfwDetectJoystickConnectionLinux(); + if (_glfw.joysticksInitialized) + _glfwDetectJoystickConnectionLinux(); #endif XPending(_glfw.x11.display);