mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-21 14:46:28 +00:00
Cocoa: Fix handling of analog joystick buttons
From upstream: 463ef7eb71
This commit is contained in:
parent
c31c32f921
commit
fb5dbc811b
1 changed files with 2 additions and 1 deletions
|
|
@ -426,7 +426,8 @@ int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)
|
|||
_GLFWjoyelementNS* button = (_GLFWjoyelementNS*)
|
||||
CFArrayGetValueAtIndex(js->ns.buttons, i);
|
||||
const char value = getElementValue(js, button) - button->minimum;
|
||||
_glfwInputJoystickButton(js, (int) i, value);
|
||||
const int state = (value > 0) ? GLFW_PRESS : GLFW_RELEASE;
|
||||
_glfwInputJoystickButton(js, (int) i, state);
|
||||
}
|
||||
|
||||
for (i = 0; i < CFArrayGetCount(js->ns.hats); i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue