[XAM] Correct error code in XamUserGetGamerTag
This commit is contained in:
parent
a7a981105a
commit
1333b4dc98
|
@ -141,18 +141,18 @@ DECLARE_XAM_EXPORT1(XamUserGetName, kUserProfiles, kImplemented);
|
||||||
dword_result_t XamUserGetGamerTag_entry(dword_t user_index,
|
dword_result_t XamUserGetGamerTag_entry(dword_t user_index,
|
||||||
lpu16string_t buffer,
|
lpu16string_t buffer,
|
||||||
dword_t buffer_len) {
|
dword_t buffer_len) {
|
||||||
if (user_index >= XUserMaxUserCount) {
|
|
||||||
return X_E_INVALIDARG;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!buffer || buffer_len < 16) {
|
if (!buffer || buffer_len < 16) {
|
||||||
return X_E_INVALIDARG;
|
return X_E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!kernel_state()->xam_state()->IsUserSignedIn(user_index)) {
|
if (user_index >= XUserMaxUserCount) {
|
||||||
return X_E_INVALIDARG;
|
return X_E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!kernel_state()->xam_state()->IsUserSignedIn(user_index)) {
|
||||||
|
return X_ERROR_NO_SUCH_USER;
|
||||||
|
}
|
||||||
|
|
||||||
const auto& user_profile =
|
const auto& user_profile =
|
||||||
kernel_state()->xam_state()->GetUserProfile(user_index);
|
kernel_state()->xam_state()->GetUserProfile(user_index);
|
||||||
auto user_name = xe::to_utf16(user_profile->name());
|
auto user_name = xe::to_utf16(user_profile->name());
|
||||||
|
|
Loading…
Reference in New Issue