From 1409b26e50468cbbcc686697e9d66b28a88c1df6 Mon Sep 17 00:00:00 2001 From: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com> Date: Mon, 11 May 2026 02:23:29 +0200 Subject: [PATCH] Fix scePadResetLightBar and scePadResetOrientation being called with the wrong handle (#4391) --- src/core/libraries/pad/pad.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/libraries/pad/pad.cpp b/src/core/libraries/pad/pad.cpp index 27dea2bd1..ddd344217 100644 --- a/src/core/libraries/pad/pad.cpp +++ b/src/core/libraries/pad/pad.cpp @@ -332,11 +332,6 @@ int PS4_SYSV_ABI scePadOpen(Libraries::UserService::OrbisUserServiceUserId userI if (!u) { return ORBIS_DEVICE_SERVICE_ERROR_USER_NOT_LOGIN; } - s32 pad_handle = u->player_index; - LOG_INFO(Lib_Pad, "called user_id = {} type = {} index = {}, player_index = {}", userId, type, - index, pad_handle); - scePadResetLightBar(pad_handle); - scePadResetOrientation(pad_handle); s32 new_handle = pad_handle_counter++; pad_handle_map[{userId, type, index}] = new_handle; @@ -344,7 +339,11 @@ int PS4_SYSV_ABI scePadOpen(Libraries::UserService::OrbisUserServiceUserId userI controllers[type == (EmulatorSettings.IsUsingSpecialPad() ? 2 : 0) ? UserManagement.GetUserByID(userId)->player_index - 1 : 4]; - LOG_INFO(Lib_Pad, "Out handle: {}", new_handle); + LOG_INFO(Lib_Pad, + "called user_id = {}, type = {}, index = {}, player index = {}, out handle = {}", + userId, type, index, u->player_index, new_handle); + scePadResetLightBar(new_handle); + scePadResetOrientation(new_handle); return new_handle; }