From 7e36489034bed9a052403301345c8547939aff11 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 8 Jul 2019 11:18:00 +0530 Subject: [PATCH] Dont call detect joysticks if support for them has been disabled --- glfw/x11_window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glfw/x11_window.c b/glfw/x11_window.c index 8baa95cb1..90fc83e55 100644 --- a/glfw/x11_window.c +++ b/glfw/x11_window.c @@ -2489,7 +2489,7 @@ _glfwDispatchX11Events(void) { unsigned dispatched = 0; #if defined(__linux__) - _glfwDetectJoystickConnectionLinux(); + if (_glfw.hints.init.enableJoysticks) _glfwDetectJoystickConnectionLinux(); #endif dispatched += dispatch_x11_queued_events(XEventsQueued(_glfw.x11.display, QueuedAfterFlush));