[XAM] Fix error code for XamUserGetIndexFromXUID

This commit is contained in:
Adrian 2024-12-03 13:32:36 +00:00 committed by Radosław Gliński
parent cfd7da696f
commit 61b2e15666
1 changed files with 7 additions and 4 deletions

View File

@ -71,15 +71,18 @@ dword_result_t XamUserGetIndexFromXUID_entry(qword_t xuid, dword_t flags,
return X_E_INVALIDARG; return X_E_INVALIDARG;
} }
auto profile_manager = kernel_state()->xam_state()->profile_manager(); const uint8_t user_index = kernel_state()
const uint8_t user_index = ->xam_state()
profile_manager->GetUserIndexAssignedToProfile(xuid); ->profile_manager()
->GetUserIndexAssignedToProfile(xuid);
if (user_index == XUserIndexAny) { if (user_index == XUserIndexAny) {
return X_E_NO_SUCH_USER; return X_E_NO_SUCH_USER;
} }
*index = user_index; *index = user_index;
return X_E_SUCCESS;
return X_ERROR_SUCCESS;
} }
DECLARE_XAM_EXPORT1(XamUserGetIndexFromXUID, kUserProfiles, kImplemented); DECLARE_XAM_EXPORT1(XamUserGetIndexFromXUID, kUserProfiles, kImplemented);