SDL: Show the guid of gamepads that are opened

From 0ef7a1d9018be05ed3790dd46b37165dc666005a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 5 Nov 2024 00:09:19 -0800
Subject: [PATCH] Show the guid of gamepads that are opened

---
 test/testcontroller.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/testcontroller.c b/test/testcontroller.c
index dc032ff147c5b..74c4ed10dc717 100644
--- a/test/testcontroller.c
+++ b/test/testcontroller.c
@@ -1027,7 +1027,10 @@ static void HandleGamepadAdded(SDL_JoystickID id, bool verbose)
             SDL_PropertiesID props = SDL_GetGamepadProperties(gamepad);
             const char *name = SDL_GetGamepadName(gamepad);
             const char *path = SDL_GetGamepadPath(gamepad);
-            SDL_Log("Opened gamepad %s%s%s\n", name, path ? ", " : "", path ? path : "");
+            SDL_GUID guid = SDL_GetGamepadGUIDForID(id);
+            char guid_string[33];
+            SDL_GUIDToString(guid, guid_string, sizeof(guid_string));
+            SDL_Log("Opened gamepad %s, guid %s%s%s\n", name, guid_string, path ? ", " : "", path ? path : "");
 
             firmware_version = SDL_GetGamepadFirmwareVersion(gamepad);
             if (firmware_version) {