mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Steam now shares device info with SDL!
This commit is contained in:
parent
30c9438f17
commit
148b518745
1 changed files with 9 additions and 11 deletions
|
@ -191,20 +191,18 @@ void BUTTONGLYPHS_update_layout(SDL_GameController *c)
|
||||||
{
|
{
|
||||||
/* Steam Virtual Gamepads can hypothetically tell us that the physical
|
/* Steam Virtual Gamepads can hypothetically tell us that the physical
|
||||||
* device is a PlayStation controller, so try to catch that scenario */
|
* device is a PlayStation controller, so try to catch that scenario */
|
||||||
const char *mapping = SDL_GameControllerMapping(c);
|
|
||||||
if (SDL_strstr(mapping, "type:") != NULL)
|
|
||||||
{
|
|
||||||
SDL_GameControllerType gct = SDL_GameControllerGetType(c);
|
SDL_GameControllerType gct = SDL_GameControllerGetType(c);
|
||||||
if ( gct == SDL_CONTROLLER_TYPE_PS3 ||
|
if ( gct == SDL_CONTROLLER_TYPE_PS3 ||
|
||||||
gct == SDL_CONTROLLER_TYPE_PS4 ||
|
gct == SDL_CONTROLLER_TYPE_PS4 ||
|
||||||
gct == SDL_CONTROLLER_TYPE_PS5 )
|
gct == SDL_CONTROLLER_TYPE_PS5 )
|
||||||
{
|
{
|
||||||
layout = LAYOUT_PLAYSTATION;
|
layout = LAYOUT_PLAYSTATION;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
layout = LAYOUT_DECK;
|
layout = LAYOUT_DECK;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (vendor == 0x057e)
|
else if (vendor == 0x057e)
|
||||||
{
|
{
|
||||||
if (product == 0x2006)
|
if (product == 0x2006)
|
||||||
|
|
Loading…
Reference in a new issue