Ray 1 ano atrás
pai
commit
8fbd42d592
1 arquivos alterados com 5 adições e 1 exclusões
  1. 5 1
      src/platforms/rcore_desktop.c

+ 5 - 1
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;
     }