Update input.c

This commit is contained in:
IntellectualKitty 2016-11-25 20:56:24 -07:00 committed by GitHub
parent a185cbe9b4
commit 7c2f18b725

View File

@ -598,6 +598,22 @@ GLFWAPI const unsigned char* glfwGetJoystickButtons(int jid, int* count)
return _glfwPlatformGetJoystickButtons(jid, count); return _glfwPlatformGetJoystickButtons(jid, count);
} }
GLFWAPI const unsigned char* glfwGetJoystickHats(int jid, int* count)
{
assert(count != NULL);
*count = 0;
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
if (jid < 0 || jid > GLFW_JOYSTICK_LAST)
{
_glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick %i", jid);
return NULL;
}
return _glfwPlatformGetJoystickHats(jid, count);
}
GLFWAPI const char* glfwGetJoystickName(int jid) GLFWAPI const char* glfwGetJoystickName(int jid)
{ {
_GLFW_REQUIRE_INIT_OR_RETURN(NULL); _GLFW_REQUIRE_INIT_OR_RETURN(NULL);