From 08f01c31a0b856bf5ba6b8cbce898e94ad736a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 26 Sep 2019 19:27:09 +0200 Subject: [PATCH] Add gamepad information to events test output --- tests/events.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/events.c b/tests/events.c index f29dfbb0..1eecc4c2 100644 --- a/tests/events.c +++ b/tests/events.c @@ -503,6 +503,20 @@ static void joystick_callback(int jid, int event) axisCount, buttonCount, hatCount); + + if (glfwJoystickIsGamepad(jid)) + { + printf(" Joystick %i (%s) has a gamepad mapping (%s)\n", + jid, + glfwGetJoystickGUID(jid), + glfwGetGamepadName(jid)); + } + else + { + printf(" Joystick %i (%s) has no gamepad mapping\n", + jid, + glfwGetJoystickGUID(jid)); + } } else {