summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/platforms/rcore_desktop.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/platforms/rcore_desktop.c b/src/platforms/rcore_desktop.c
index f1ad8a9a..de34c871 100644
--- a/src/platforms/rcore_desktop.c
+++ b/src/platforms/rcore_desktop.c
@@ -1120,7 +1120,11 @@ void PollInputEvents(void)
// NOTE: We do it here in case of disconnection
for (int i = 0; i < MAX_GAMEPADS; i++)
{
- if (glfwJoystickPresent(i)) CORE.Input.Gamepad.ready[i] = true;
+ if (glfwJoystickPresent(i))
+ {
+ CORE.Input.Gamepad.ready[i] = true;
+ strcpy(CORE.Input.Gamepad.name[i], glfwGetJoystickName(i));
+ }
else CORE.Input.Gamepad.ready[i] = false;
}