mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Update input.c
This commit is contained in:
parent
ed65906282
commit
6cd8a73064
@ -153,7 +153,8 @@ static GLFWbool parseMapping(_GLFWmapping *mapping, const char *string)
|
||||
{ "leftx", mapping->axes + GLFW_GAMEPAD_AXIS_LEFT_X },
|
||||
{ "lefty", mapping->axes + GLFW_GAMEPAD_AXIS_LEFT_Y },
|
||||
{ "rightx", mapping->axes + GLFW_GAMEPAD_AXIS_RIGHT_X },
|
||||
{"righty", mapping->axes + GLFW_GAMEPAD_AXIS_RIGHT_Y}};
|
||||
{ "righty", mapping->axes + GLFW_GAMEPAD_AXIS_RIGHT_Y }
|
||||
};
|
||||
|
||||
length = strcspn(c, ",");
|
||||
if (length != 32 || c[length] != ',')
|
||||
@ -261,6 +262,7 @@ static GLFWbool parseMapping(_GLFWmapping *mapping, const char *string)
|
||||
return GLFW_TRUE;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW event API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@ -512,7 +514,6 @@ void _glfwInputJoystickHat(_GLFWjoystick *js, int hat, char value)
|
||||
js->buttons[base + 1] = (value & 0x02) ? GLFW_PRESS : GLFW_RELEASE;
|
||||
js->buttons[base + 2] = (value & 0x04) ? GLFW_PRESS : GLFW_RELEASE;
|
||||
js->buttons[base + 3] = (value & 0x08) ? GLFW_PRESS : GLFW_RELEASE;
|
||||
|
||||
if (js->hats[hat] != value)
|
||||
{
|
||||
const int jid = (int)(js - _glfw.joysticks);
|
||||
|
Loading…
Reference in New Issue
Block a user