mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-21 12:04:45 +00:00
core: handle scePadSetLightBar wrong lightbar setting
This commit is contained in:
parent
f2f87f2ef6
commit
594fe42826
1 changed files with 6 additions and 0 deletions
|
@ -429,6 +429,12 @@ int PS4_SYSV_ABI scePadSetLightBar(s32 handle, const OrbisPadLightBarParam* pPar
|
|||
if (pParam != nullptr) {
|
||||
LOG_INFO(Lib_Pad, "scePadSetLightBar called handle = {} rgb = {} {} {}", handle, pParam->r,
|
||||
pParam->g, pParam->b);
|
||||
|
||||
if (pParam->r < 0xD && pParam->g < 0xD && pParam->b < 0xD) {
|
||||
LOG_INFO(Lib_Pad, "Invalid lightbar setting");
|
||||
return ORBIS_PAD_ERROR_INVALID_LIGHTBAR_SETTING;
|
||||
}
|
||||
|
||||
auto* controller = Common::Singleton<Input::GameController>::Instance();
|
||||
controller->SetLightBarRGB(pParam->r, pParam->g, pParam->b);
|
||||
return ORBIS_OK;
|
||||
|
|
Loading…
Add table
Reference in a new issue