1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Linux joystick cleanup.

This commit is contained in:
Camilla Berglund 2014-05-16 11:27:30 +02:00
parent deed44a4af
commit e02b278db1

View File

@ -211,8 +211,6 @@ void _glfwTerminateJoysticks(void)
free(_glfw.linux_js[i].axes); free(_glfw.linux_js[i].axes);
free(_glfw.linux_js[i].buttons); free(_glfw.linux_js[i].buttons);
free(_glfw.linux_js[i].name); free(_glfw.linux_js[i].name);
_glfw.linux_js[i].present = GL_FALSE;
} }
} }
#endif // __linux__ #endif // __linux__
@ -234,9 +232,6 @@ const float* _glfwPlatformGetJoystickAxes(int joy, int* count)
{ {
pollJoystickEvents(); pollJoystickEvents();
if (!_glfw.linux_js[joy].present)
return NULL;
*count = _glfw.linux_js[joy].axisCount; *count = _glfw.linux_js[joy].axisCount;
return _glfw.linux_js[joy].axes; return _glfw.linux_js[joy].axes;
} }
@ -245,9 +240,6 @@ const unsigned char* _glfwPlatformGetJoystickButtons(int joy, int* count)
{ {
pollJoystickEvents(); pollJoystickEvents();
if (!_glfw.linux_js[joy].present)
return NULL;
*count = _glfw.linux_js[joy].buttonCount; *count = _glfw.linux_js[joy].buttonCount;
return _glfw.linux_js[joy].buttons; return _glfw.linux_js[joy].buttons;
} }