diff --git a/src/xenia/kernel/xam/user_profile.h b/src/xenia/kernel/xam/user_profile.h index b78367d4d..b4a5f4f68 100644 --- a/src/xenia/kernel/xam/user_profile.h +++ b/src/xenia/kernel/xam/user_profile.h @@ -161,6 +161,9 @@ class UserProfile { uint32_t type() const { return 1 | 2; /* local | online profile? */ } uint32_t GetCachedFlags() const { return account_info_.GetCachedFlags(); }; + uint32_t GetSubscriptionTier() const { + return account_info_.GetSubscriptionTier(); + } void AddSetting(std::unique_ptr setting); UserSetting* GetSetting(uint32_t setting_id); diff --git a/src/xenia/kernel/xam/xam_user.cc b/src/xenia/kernel/xam/xam_user.cc index b6a330a89..628af300b 100644 --- a/src/xenia/kernel/xam/xam_user.cc +++ b/src/xenia/kernel/xam/xam_user.cc @@ -510,7 +510,8 @@ dword_result_t XamUserGetMembershipTier_entry(dword_t user_index) { if (!kernel_state()->xam_state()->IsUserSignedIn(user_index)) { return X_ERROR_NO_SUCH_USER; } - return 6 /* 6 appears to be Gold */; + + return X_XAMACCOUNTINFO::AccountSubscriptionTier::kSubscriptionTierGold; } DECLARE_XAM_EXPORT1(XamUserGetMembershipTier, kUserProfiles, kStub); @@ -705,14 +706,16 @@ dword_result_t XamUserIsUnsafeProgrammingAllowed_entry(dword_t user_index, DECLARE_XAM_EXPORT1(XamUserIsUnsafeProgrammingAllowed, kUserProfiles, kStub); dword_result_t XamUserGetSubscriptionType_entry(dword_t user_index, - dword_t unk2, dword_t unk3, - dword_t unk4, dword_t unk5, - dword_t unk6) { - if (!unk2 || !unk3 || user_index >= XUserMaxUserCount) { + dword_t unk2, dword_t unk3) { + if (user_index >= XUserMaxUserCount) { + return X_ERROR_INVALID_PARAMETER; + } + + if (!unk2 || !unk3) { return X_E_INVALIDARG; } - return 0; + return X_ERROR_SUCCESS; } DECLARE_XAM_EXPORT1(XamUserGetSubscriptionType, kUserProfiles, kStub); diff --git a/src/xenia/xbox.h b/src/xenia/xbox.h index 307348608..902acb85b 100644 --- a/src/xenia/xbox.h +++ b/src/xenia/xbox.h @@ -589,6 +589,7 @@ struct X_XAMACCOUNTINFO { }; enum AccountSubscriptionTier { + kSubscriptionTierNone = 0, kSubscriptionTierSilver = 3, kSubscriptionTierGold = 6, kSubscriptionTierFamilyGold = 9