mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05: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