1
0
Fork 0
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:
Camilla Berglund 2012-11-08 16:26:43 +01:00
parent 7eff6b1b1e
commit 875a169792

View File

@ -340,6 +340,9 @@ int _glfwPlatformGetJoystickButtons(int joy, unsigned char* buttons,
const char* _glfwPlatformGetJoystickName(int joy) const char* _glfwPlatformGetJoystickName(int joy)
{ {
if (!_glfwLibrary.X11.joystick[joy].present)
return NULL;
return _glfwLibrary.X11.joystick[joy].name; return _glfwLibrary.X11.joystick[joy].name;
} }