Browse Source

Fix #3461

pull/3462/head
Ray 1 year ago
parent
commit
8fbd42d592
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/platforms/rcore_desktop.c

+ 5
- 1
src/platforms/rcore_desktop.c View File

@ -1120,7 +1120,11 @@ void PollInputEvents(void)
// NOTE: We do it here in case of disconnection // NOTE: We do it here in case of disconnection
for (int i = 0; i < MAX_GAMEPADS; i++) 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; else CORE.Input.Gamepad.ready[i] = false;
} }

Loading…
Cancel
Save