1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-30 05:58:52 -05:00
This commit is contained in:
Camilla Berglund 2016-03-29 13:42:11 +02:00
parent ae4ece840d
commit c580949417

View File

@ -481,7 +481,7 @@ void _glfwTerminateJoysticksNS(void)
int _glfwPlatformJoystickPresent(int joy)
{
_GLFWjoydeviceNS* joystick = _glfw.ns_js.devices + joy;
return joystick->present ? GLFW_TRUE : GLFW_FALSE;
return joystick->present;
}
const float* _glfwPlatformGetJoystickAxes(int joy, int* count)
@ -508,9 +508,9 @@ const unsigned char* _glfwPlatformGetJoystickButtons(int joy, int* count)
const char* _glfwPlatformGetJoystickName(int joy)
{
_GLFWjoydeviceNS* joystick = _glfw.ns_js.devices + joy;
if (joystick->present)
return joystick->name;
else
if (!joystick->present)
return NULL;
return joystick->name;
}