diff options
| author | Ray <[email protected]> | 2023-10-25 10:14:17 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2023-10-25 10:14:17 +0200 |
| commit | 8fbd42d592c22612e18d2c6f9bcef8a107984675 (patch) | |
| tree | 8026c2565dfdbd66a3b841a012b64d1de0cff456 /src | |
| parent | 803b1a910e0b23986688e9d4e53b77d18ba41767 (diff) | |
| download | raylib-8fbd42d592c22612e18d2c6f9bcef8a107984675.tar.gz raylib-8fbd42d592c22612e18d2c6f9bcef8a107984675.zip | |
Fix #3461
Diffstat (limited to 'src')
| -rw-r--r-- | src/platforms/rcore_desktop.c | 6 |
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; } |
