mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
Change PS4/PS5 LED to the tunic color
This commit is contained in:
parent
04f7efe588
commit
7dd991caca
2 changed files with 24 additions and 6 deletions
|
@ -336,11 +336,19 @@ namespace Ship {
|
|||
}
|
||||
|
||||
if (SDL_GameControllerHasLED(Cont)) {
|
||||
if (controller->ledColor == 1) {
|
||||
switch (controller->ledColor) {
|
||||
case 0:
|
||||
SDL_JoystickSetLED(SDL_GameControllerGetJoystick(Cont), 255, 0, 0);
|
||||
}
|
||||
else {
|
||||
SDL_JoystickSetLED(SDL_GameControllerGetJoystick(Cont), 0, 255, 0);
|
||||
break;
|
||||
case 1:
|
||||
SDL_JoystickSetLED(SDL_GameControllerGetJoystick(Cont), 0x1E, 0x69, 0x1B);
|
||||
break;
|
||||
case 2:
|
||||
SDL_JoystickSetLED(SDL_GameControllerGetJoystick(Cont), 0x64, 0x14, 0x00);
|
||||
break;
|
||||
case 3:
|
||||
SDL_JoystickSetLED(SDL_GameControllerGetJoystick(Cont), 0x00, 0x3C, 0x64);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -272,9 +272,19 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
|
|||
controllerCallback.rumble = padMgr->rumbleEnable[0] > 0 ? 1 : 0;
|
||||
|
||||
if (HealthMeter_IsCritical()) {
|
||||
controllerCallback.ledColor = 1;
|
||||
} else {
|
||||
controllerCallback.ledColor = 0;
|
||||
} else if (gGlobalCtx) {
|
||||
switch (CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1) {
|
||||
case PLAYER_TUNIC_KOKIRI:
|
||||
controllerCallback.ledColor = 1;
|
||||
break;
|
||||
case PLAYER_TUNIC_GORON:
|
||||
controllerCallback.ledColor = 2;
|
||||
break;
|
||||
case PLAYER_TUNIC_ZORA:
|
||||
controllerCallback.ledColor = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
OTRControllerCallback(&controllerCallback);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue