1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00
This commit is contained in:
Camilla Löwy 2018-01-24 21:18:38 +01:00
parent 8a8eefa0d8
commit a678665c49

View File

@ -1190,7 +1190,7 @@ GLFWAPI int glfwGetGamepadState(int jid, GLFWgamepadstate* state)
{ {
if (js->mapping->buttons[i].type == _GLFW_JOYSTICK_AXIS) if (js->mapping->buttons[i].type == _GLFW_JOYSTICK_AXIS)
{ {
if (fabs(js->axes[js->mapping->buttons[i].value]) > 0.5) if (fabsf(js->axes[js->mapping->buttons[i].value]) > 0.5f)
state->buttons[i] = GLFW_PRESS; state->buttons[i] = GLFW_PRESS;
} }
else if (js->mapping->buttons[i].type == _GLFW_JOYSTICK_HATBIT) else if (js->mapping->buttons[i].type == _GLFW_JOYSTICK_HATBIT)