From 67d722788da5099a9ad9474f45357b952fac7cbf Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Fri, 7 Oct 2022 21:26:21 -0400 Subject: [PATCH] Wayland: Fix detection of joysticks after init Closes #2198 This was adapted to 3.3-stable from 0b94e1b29b5be16fc0979de8ac107e93ae440419 and 3fa2360720eeba1964df3c0ecf4b5df8648a8e52. --- README.md | 1 + src/wl_window.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index dd125530..525fefd6 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,7 @@ information on what to include when reporting a bug. - [Wayland] Disabled alpha channel for opaque windows on systems lacking `EGL_EXT_present_opaque` (#1895) - [Wayland] Bugfix: Buffer would overrun when storing received drag offer (#2225) + - [Wayland] Bugfix: Joysticks connected after `glfwInit` were not detected (#2198) - [Linux] Bugfix: Joysticks without buttons were ignored (#2042,#2043) [EGL] Added loading of glvnd `libOpenGL.so.0` where available for OpenGL - [GLX] Added loading of glvnd `libGLX.so.0` where available diff --git a/src/wl_window.c b/src/wl_window.c index c52a5923..88647a53 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1127,6 +1127,10 @@ static void inputText(_GLFWwindow* window, uint32_t scancode) static void handleEvents(double* timeout) { +#if defined(__linux__) + _glfwDetectJoystickConnectionLinux(); +#endif + GLFWbool event = GLFW_FALSE; struct pollfd fds[4] = {