mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-11 09:55:36 +00:00
The player LED index wraps for PS5 controllers, like it does for other controller types
This commit is contained in:
parent
593d20d9cc
commit
5545be8530
|
@ -238,8 +238,9 @@ SetLightsForPlayerIndex(DS5EffectsState_t *effects, int player_index)
|
||||||
0x1B
|
0x1B
|
||||||
};
|
};
|
||||||
|
|
||||||
if (player_index >= 0 && player_index < SDL_arraysize(lights)) {
|
if (player_index >= 0) {
|
||||||
/* Bitmask, 0x1F enables all lights, 0x20 changes instantly instead of fade */
|
/* Bitmask, 0x1F enables all lights, 0x20 changes instantly instead of fade */
|
||||||
|
player_index %= SDL_arraysize(lights);
|
||||||
effects->ucPadLights = lights[player_index] | 0x20;
|
effects->ucPadLights = lights[player_index] | 0x20;
|
||||||
} else {
|
} else {
|
||||||
effects->ucPadLights = 0x00;
|
effects->ucPadLights = 0x00;
|
||||||
|
|
Loading…
Reference in a new issue