From 337a4589a94139bde9e77644d28624038faa221b Mon Sep 17 00:00:00 2001 From: Locria Cyber <74560659+iacore@users.noreply.github.com> Date: Tue, 13 Jun 2023 15:22:22 +0000 Subject: [PATCH] Add guard for linux joystick --- src/input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input.c b/src/input.c index f0e27369..5f107d41 100644 --- a/src/input.c +++ b/src/input.c @@ -102,8 +102,8 @@ static _GLFWmapping* findMapping(const char* guid) return _glfw.mappings + i; } +#if defined(GLFW_BUILD_LINUX_JOYSTICK) // only match vendor product - this = parseGUID(guid); for (int i = 0; i < _glfw.mappingCount; i++) @@ -113,6 +113,7 @@ static _GLFWmapping* findMapping(const char* guid) if (memcmp(&this, &that, sizeof(struct vendor_product)) == 0) return _glfw.mappings + i; } +#endif return NULL; }