mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
Update input.c
This commit is contained in:
parent
a185cbe9b4
commit
7c2f18b725
16
src/input.c
16
src/input.c
@ -598,6 +598,22 @@ GLFWAPI const unsigned char* glfwGetJoystickButtons(int jid, int* 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)
|
||||
{
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user