SDL: Fixed building with GameInput v1.0 (e5d57)

From e5d57d8ad6e6081675545463a912c9d305847dea Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 24 Jul 2025 10:52:09 -0700
Subject: [PATCH] Fixed building with GameInput v1.0

---
 src/joystick/gdk/SDL_gameinputjoystick.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/joystick/gdk/SDL_gameinputjoystick.cpp b/src/joystick/gdk/SDL_gameinputjoystick.cpp
index 96f0daea592b5..bd1e9eaf63214 100644
--- a/src/joystick/gdk/SDL_gameinputjoystick.cpp
+++ b/src/joystick/gdk/SDL_gameinputjoystick.cpp
@@ -84,6 +84,7 @@ static bool GAMEINPUT_InternalIsGamepad(const GameInputDeviceInfo *info)
     return false;
 }
 
+#if GAMEINPUT_API_VERSION >= 1
 static int GetSteamVirtualGamepadSlot(const char *device_path)
 {
     int slot = -1;
@@ -93,6 +94,7 @@ static int GetSteamVirtualGamepadSlot(const char *device_path)
     (void)SDL_sscanf(device_path, "\\\\.\\pipe\\HID#VID_045E&PID_028E&IG_00#%*X&%*X&%*X#%d#%*u", &slot);
     return slot;
 }
+#endif // GAMEINPUT_API_VERSION >= 1
 
 static bool GAMEINPUT_InternalAddOrFind(IGameInputDevice *pDevice)
 {