From e55e616f1f25a36caaa11c8ab7bcfed8f47c9b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 13 Jul 2017 01:35:15 +0200 Subject: [PATCH] Cleanup Replaces tabs with spaces. Makes code idiomatic. Adds credit. Closes #1043. --- README.md | 1 + src/win32_joystick.c | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cfe4d692..e1a638a3 100644 --- a/README.md +++ b/README.md @@ -259,6 +259,7 @@ skills. - Martin Capitanio - David Carlier - Chi-kwan Chan + - Michał Cichoń - Lambert Clara - Andrew Corrigan - Noel Cower diff --git a/src/win32_joystick.c b/src/win32_joystick.c index d6bd6c5d..6db08467 100644 --- a/src/win32_joystick.c +++ b/src/win32_joystick.c @@ -576,15 +576,13 @@ void _glfwDetectJoystickConnectionWin32(void) void _glfwDetectJoystickDisconnectionWin32(void) { int jid; - _GLFWjoystick* js; - - for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++) - { - js = &_glfw.joysticks[jid]; + for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++) + { + _GLFWjoystick* js = _glfw.joysticks + jid; if (js->present) - _glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE); - } + _glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE); + } }