From 274dd2f3fe6e7593b8564fc198470bfea85c603d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Feb 2019 20:17:28 +0530 Subject: [PATCH] Cleanup From upstream: https://github.com/glfw/glfw/commit/90e22947c60b0c1fa47cf1496790ce1942e4a5d8 --- glfw/cocoa_joystick.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glfw/cocoa_joystick.m b/glfw/cocoa_joystick.m index 38d4bc033..96dbd545f 100644 --- a/glfw/cocoa_joystick.m +++ b/glfw/cocoa_joystick.m @@ -406,12 +406,12 @@ int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode) if (raw > axis->maximum) axis->maximum = raw; - const long delta = axis->maximum - axis->minimum; - if (delta == 0) + const long size = axis->maximum - axis->minimum; + if (size == 0) _glfwInputJoystickAxis(js, (int) i, 0.f); else { - const float value = (2.f * (raw - axis->minimum) / delta) - 1.f; + const float value = (2.f * (raw - axis->minimum) / size) - 1.f; _glfwInputJoystickAxis(js, (int) i, value); } }