Skip to content

Commit e5d57d8

Browse files
committed
Fixed building with GameInput v1.0
1 parent 0ee0fe1 commit e5d57d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/joystick/gdk/SDL_gameinputjoystick.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ static bool GAMEINPUT_InternalIsGamepad(const GameInputDeviceInfo *info)
8484
return false;
8585
}
8686

87+
#if GAMEINPUT_API_VERSION >= 1
8788
static int GetSteamVirtualGamepadSlot(const char *device_path)
8889
{
8990
int slot = -1;
@@ -93,6 +94,7 @@ static int GetSteamVirtualGamepadSlot(const char *device_path)
9394
(void)SDL_sscanf(device_path, "\\\\.\\pipe\\HID#VID_045E&PID_028E&IG_00#%*X&%*X&%*X#%d#%*u", &slot);
9495
return slot;
9596
}
97+
#endif // GAMEINPUT_API_VERSION >= 1
9698

9799
static bool GAMEINPUT_InternalAddOrFind(IGameInputDevice *pDevice)
98100
{

0 commit comments

Comments
 (0)