From 472e5fc4a9c2003f05bafb659dc6b0502c0eb3f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 17 Jul 2017 23:15:48 +0200 Subject: [PATCH] Fix warning --- src/input.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/input.c b/src/input.c index f4542b4e..2a5dfef0 100644 --- a/src/input.c +++ b/src/input.c @@ -258,8 +258,10 @@ void _glfwInputDrop(_GLFWwindow* window, int count, const char** paths) void _glfwInputJoystick(_GLFWjoystick* js, int event) { + const int jid = (int) (js - _glfw.joysticks); + if (_glfw.callbacks.joystick) - _glfw.callbacks.joystick(js - _glfw.joysticks, event); + _glfw.callbacks.joystick(jid, event); } void _glfwInputJoystickAxis(_GLFWjoystick* js, int axis, float value)