mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Added missing test for joystick presence.
This commit is contained in:
parent
7eff6b1b1e
commit
875a169792
@ -340,6 +340,9 @@ int _glfwPlatformGetJoystickButtons(int joy, unsigned char* buttons,
|
||||
|
||||
const char* _glfwPlatformGetJoystickName(int joy)
|
||||
{
|
||||
if (!_glfwLibrary.X11.joystick[joy].present)
|
||||
return NULL;
|
||||
|
||||
return _glfwLibrary.X11.joystick[joy].name;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user