Skip to content

Commit 0ee0fe1

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

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/joystick/gdk/SDL_gameinputjoystick.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@ static bool GAMEINPUT_InternalAddOrFind(IGameInputDevice *pDevice)
173173
elem->guid = SDL_CreateJoystickGUID(bus, vendor, product, version, manufacturer_string, product_string, 'g', 0);
174174
elem->device_instance = SDL_GetNextObjectID();
175175
elem->info = info;
176+
#if GAMEINPUT_API_VERSION >= 1
176177
elem->steam_virtual_gamepad_slot = GetSteamVirtualGamepadSlot(info->pnpPath);
178+
#else
179+
elem->steam_virtual_gamepad_slot = -1;
180+
#endif
177181

178182
g_GameInputList.devices = devicelist;
179183
g_GameInputList.devices[g_GameInputList.count++] = elem;

0 commit comments

Comments
 (0)