mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-26 12:21:39 +00:00
hid: implemented controller LED context
This commit is contained in:
parent
fd009bcada
commit
659f3700ee
1 changed files with 15 additions and 0 deletions
|
|
@ -238,6 +238,21 @@ int HID_OnSDLEvent(void*, SDL_Event* event)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case SDL_USER_EVILSONIC:
|
||||||
|
{
|
||||||
|
if (!g_activeController)
|
||||||
|
break;
|
||||||
|
|
||||||
|
auto isNight = event->user.code;
|
||||||
|
auto r = isNight ? 22 : 0;
|
||||||
|
auto g = isNight ? 0 : 37;
|
||||||
|
auto b = isNight ? 101 : 184;
|
||||||
|
|
||||||
|
SDL_GameControllerSetLED(g_activeController->controller, r, g, b);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue