mirror of
https://github.com/encounter/SDL.git
synced 2025-12-17 00:47:15 +00:00
Allow setting the player index to -1, which turns off the player LED for PS5 controllers
This commit is contained in:
@@ -133,7 +133,9 @@ HIDAPI_DriverXbox360_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_Joystic
|
||||
if (!device->dev) {
|
||||
return;
|
||||
}
|
||||
SetSlotLED(device->dev, (player_index % 4));
|
||||
if (player_index >= 0) {
|
||||
SetSlotLED(device->dev, (player_index % 4));
|
||||
}
|
||||
}
|
||||
|
||||
static SDL_bool
|
||||
|
||||
@@ -131,7 +131,9 @@ HIDAPI_DriverXbox360W_SetDevicePlayerIndex(SDL_HIDAPI_Device *device, SDL_Joysti
|
||||
if (!device->dev) {
|
||||
return;
|
||||
}
|
||||
SetSlotLED(device->dev, (player_index % 4));
|
||||
if (player_index >= 0) {
|
||||
SetSlotLED(device->dev, (player_index % 4));
|
||||
}
|
||||
}
|
||||
|
||||
static SDL_bool
|
||||
|
||||
Reference in New Issue
Block a user