Fix scePadResetLightBar for TV remotes (#4244)

This commit is contained in:
kalaposfos13 2026-04-09 20:43:27 +02:00 committed by GitHub
parent 474a910ac4
commit daa7b5c04b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -507,7 +507,8 @@ int PS4_SYSV_ABI scePadResetLightBar(s32 handle) {
return ORBIS_PAD_ERROR_INVALID_HANDLE;
}
auto& controllers = *Common::Singleton<GameControllers>::Instance();
s32 colour_index = UserManagement.GetUserByPlayerIndex(handle)->user_color - 1;
auto u = UserManagement.GetUserByPlayerIndex(handle);
s32 colour_index = u ? u->user_color - 1 : 0;
Input::Colour colour{255, 0, 0};
if (colour_index >= 0 && colour_index <= 3) {
static constexpr Input::Colour colours[4]{