From 00967cbb8a4a51ea8ff6f8b8a7efcf1f761cc664 Mon Sep 17 00:00:00 2001 From: TheBrokenRail <17478432+TheBrokenRail@users.noreply.github.com> Date: Thu, 15 Dec 2022 14:18:59 -0500 Subject: [PATCH 1/4] Linux: Fix joystick input being disabled Closes #2192 --- src/wl_init.c | 2 +- src/x11_init.c | 2 +- src/x11_window.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wl_init.c b/src/wl_init.c index 4e6b4294..7a9157a4 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -394,7 +394,7 @@ GLFWbool _glfwConnectWayland(int platformID, _GLFWplatform* platform) _glfwGetKeyScancodeWayland, _glfwSetClipboardStringWayland, _glfwGetClipboardStringWayland, -#if defined(_GLFW_LINUX_JOYSTICK) +#if defined(GLFW_BUILD_LINUX_JOYSTICK) _glfwInitJoysticksLinux, _glfwTerminateJoysticksLinux, _glfwPollJoystickLinux, diff --git a/src/x11_init.c b/src/x11_init.c index 1c69c0f6..a0100f2f 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -1184,7 +1184,7 @@ GLFWbool _glfwConnectX11(int platformID, _GLFWplatform* platform) _glfwGetKeyScancodeX11, _glfwSetClipboardStringX11, _glfwGetClipboardStringX11, -#if defined(_GLFW_LINUX_JOYSTICK) +#if defined(GLFW_BUILD_LINUX_JOYSTICK) _glfwInitJoysticksLinux, _glfwTerminateJoysticksLinux, _glfwPollJoystickLinux, diff --git a/src/x11_window.c b/src/x11_window.c index 2c46bfff..7da9b965 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -88,7 +88,7 @@ static GLFWbool waitForAnyEvent(double* timeout) { _glfw.x11.emptyEventPipe[0], POLLIN } }; -#if defined(_GLFW_LINUX_JOYSTICK) +#if defined(GLFW_BUILD_LINUX_JOYSTICK) if (_glfw.joysticksInitialized) fds[count++] = (struct pollfd) { _glfw.linjs.inotify, POLLIN }; #endif @@ -2783,7 +2783,7 @@ void _glfwPollEventsX11(void) { drainEmptyEvents(); -#if defined(_GLFW_LINUX_JOYSTICK) +#if defined(GLFW_BUILD_LINUX_JOYSTICK) if (_glfw.joysticksInitialized) _glfwDetectJoystickConnectionLinux(); #endif From 41d8da1cea55732867b5c3a7159215071b87b790 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Fri, 16 Dec 2022 21:40:36 +0900 Subject: [PATCH 2/4] Wayland: Fix wrong array size for _GLFWofferWayland Closes #2225 --- src/wl_window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wl_window.c b/src/wl_window.c index c4d097b7..a227c16f 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1640,7 +1640,8 @@ static void dataDeviceHandleDataOffer(void* userData, struct wl_data_offer* offer) { _GLFWofferWayland* offers = - _glfw_realloc(_glfw.wl.offers, _glfw.wl.offerCount + 1); + _glfw_realloc(_glfw.wl.offers, + sizeof(_GLFWofferWayland) * (_glfw.wl.offerCount + 1)); if (!offers) { _glfwInputError(GLFW_OUT_OF_MEMORY, NULL); From 57cbded0760a50b9039ee0cb3f3c14f60145567c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Fri, 16 Dec 2022 13:44:59 +0100 Subject: [PATCH 3/4] Add credit Related to #2225 --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 110ed4cd..47301dae 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -8,6 +8,7 @@ video tutorials. - Bobyshev Alexander - Laurent Aphecetche - Matt Arsenault + - Takuro Ashie - ashishgamedev - David Avedissian - Luca Bacci From 8f470597d625ae28758c16b4293dd42d63e8a83a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 26 Jan 2023 18:41:46 +0100 Subject: [PATCH 4/4] Add support for manually running build workflow --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f798851..4e4c72e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ on: pull_request: push: branches: [ ci, master, latest, 3.3-stable ] + workflow_dispatch: permissions: statuses: write contents: read