mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Add guard for linux joystick
This commit is contained in:
parent
1e9380584a
commit
337a4589a9
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user