From 8cbfc3235046a5759003c2a7b14199dde11a2fd4 Mon Sep 17 00:00:00 2001 From: yerejm Date: Wed, 26 Oct 2016 21:49:26 +1000 Subject: [PATCH] Cocoa: Fix joystick hat button press detection for up-left direction --- src/cocoa_joystick.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cocoa_joystick.m b/src/cocoa_joystick.m index 72cebcfcd..73e833dd0 100644 --- a/src/cocoa_joystick.m +++ b/src/cocoa_joystick.m @@ -246,7 +246,7 @@ static GLFWbool pollJoystickButtonEvents(_GLFWjoystickNS* js) CFArrayGetValueAtIndex(js->hatElements, i); // Bit fields of button presses for each direction, including nil - const int directions[9] = { 1, 3, 2, 6, 4, 12, 8, 9, 0 }; + const int directions[9] = { 0, 1, 3, 2, 6, 4, 12, 8, 9 }; long j, value = getElementValue(js, hat); if (value < 0 || value > 8)