Add guard for linux joystick

This commit is contained in:
Locria Cyber 2023-06-13 15:22:22 +00:00
parent 1e9380584a
commit 337a4589a9
No known key found for this signature in database
GPG Key ID: ED0D424AE4406330

View File

@ -102,8 +102,8 @@ static _GLFWmapping* findMapping(const char* guid)
return _glfw.mappings + i; return _glfw.mappings + i;
} }
#if defined(GLFW_BUILD_LINUX_JOYSTICK)
// only match vendor product // only match vendor product
this = parseGUID(guid); this = parseGUID(guid);
for (int i = 0; i < _glfw.mappingCount; i++) 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) if (memcmp(&this, &that, sizeof(struct vendor_product)) == 0)
return _glfw.mappings + i; return _glfw.mappings + i;
} }
#endif
return NULL; return NULL;
} }