mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 19:38:14 +00:00
Fixed building with GameInput v1.0
This commit is contained in:
@@ -173,7 +173,11 @@ static bool GAMEINPUT_InternalAddOrFind(IGameInputDevice *pDevice)
|
|||||||
elem->guid = SDL_CreateJoystickGUID(bus, vendor, product, version, manufacturer_string, product_string, 'g', 0);
|
elem->guid = SDL_CreateJoystickGUID(bus, vendor, product, version, manufacturer_string, product_string, 'g', 0);
|
||||||
elem->device_instance = SDL_GetNextObjectID();
|
elem->device_instance = SDL_GetNextObjectID();
|
||||||
elem->info = info;
|
elem->info = info;
|
||||||
|
#if GAMEINPUT_API_VERSION >= 1
|
||||||
elem->steam_virtual_gamepad_slot = GetSteamVirtualGamepadSlot(info->pnpPath);
|
elem->steam_virtual_gamepad_slot = GetSteamVirtualGamepadSlot(info->pnpPath);
|
||||||
|
#else
|
||||||
|
elem->steam_virtual_gamepad_slot = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
g_GameInputList.devices = devicelist;
|
g_GameInputList.devices = devicelist;
|
||||||
g_GameInputList.devices[g_GameInputList.count++] = elem;
|
g_GameInputList.devices[g_GameInputList.count++] = elem;
|
||||||
|
Reference in New Issue
Block a user