ソースを参照

Wayland: Fix detection of joysticks after init

Closes #2198

This was adapted to 3.3-stable from
0b94e1b29b5be16fc0979de8ac107e93ae440419 and
3fa2360720eeba1964df3c0ecf4b5df8648a8e52.
TheBrokenRail 3 年 前
コミット
67d722788d
2 ファイル変更5 行追加0 行削除
  1. 1 0
      README.md
  2. 4 0
      src/wl_window.c

+ 1 - 0
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

+ 4 - 0
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] =
     {