SDL: Print the GUID for controllers that don't have a mapping

From 2ff9255f299b0d54032235719516f07014013b21 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 15 Nov 2023 20:54:38 -0800
Subject: [PATCH] Print the GUID for controllers that don't have a mapping

---
 test/testcontroller.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/testcontroller.c b/test/testcontroller.c
index a8b8bfa38d88..91f334f3caf1 100644
--- a/test/testcontroller.c
+++ b/test/testcontroller.c
@@ -849,9 +849,12 @@ static void AddController(SDL_JoystickID id, SDL_bool verbose)
     joystick = new_controller->joystick;
     if (joystick) {
         if (verbose && !SDL_IsGamepad(id)) {
-            const char *name = SDL_GetJoystickName(new_controller->joystick);
-            const char *path = SDL_GetJoystickPath(new_controller->joystick);
+            const char *name = SDL_GetJoystickName(joystick);
+            const char *path = SDL_GetJoystickPath(joystick);
+            char guid[33];
             SDL_Log("Opened joystick %s%s%s\n", name, path ? ", " : "", path ? path : "");
+            SDL_GetJoystickGUIDString(SDL_GetJoystickGUID(joystick), guid, sizeof(guid));
+            SDL_Log("No gamepad mapping for %s\n", guid);
         }
     } else {
         SDL_Log("Couldn't open joystick: %s", SDL_GetError());