From c580949417bf0d8f41815007a71c7fd7f40c425d Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 29 Mar 2016 13:42:11 +0200 Subject: [PATCH] Cleanup --- src/cocoa_joystick.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cocoa_joystick.m b/src/cocoa_joystick.m index 9c7ccc42..29264f49 100644 --- a/src/cocoa_joystick.m +++ b/src/cocoa_joystick.m @@ -481,7 +481,7 @@ void _glfwTerminateJoysticksNS(void) int _glfwPlatformJoystickPresent(int joy) { _GLFWjoydeviceNS* joystick = _glfw.ns_js.devices + joy; - return joystick->present ? GLFW_TRUE : GLFW_FALSE; + return joystick->present; } const float* _glfwPlatformGetJoystickAxes(int joy, int* count) @@ -508,9 +508,9 @@ const unsigned char* _glfwPlatformGetJoystickButtons(int joy, int* count) const char* _glfwPlatformGetJoystickName(int joy) { _GLFWjoydeviceNS* joystick = _glfw.ns_js.devices + joy; - if (joystick->present) - return joystick->name; - else + if (!joystick->present) return NULL; + + return joystick->name; }