Skip to content

Commit

Permalink
Fix #3461
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Oct 25, 2023
1 parent 803b1a9 commit 8fbd42d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/platforms/rcore_desktop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8fbd42d

Please sign in to comment.