[XAM] Improve XamUserGetSubscriptionType
This commit is contained in:
parent
d516e8091c
commit
b17faf84f2
|
@ -161,6 +161,9 @@ class UserProfile {
|
||||||
uint32_t type() const { return 1 | 2; /* local | online profile? */ }
|
uint32_t type() const { return 1 | 2; /* local | online profile? */ }
|
||||||
|
|
||||||
uint32_t GetCachedFlags() const { return account_info_.GetCachedFlags(); };
|
uint32_t GetCachedFlags() const { return account_info_.GetCachedFlags(); };
|
||||||
|
uint32_t GetSubscriptionTier() const {
|
||||||
|
return account_info_.GetSubscriptionTier();
|
||||||
|
}
|
||||||
|
|
||||||
void AddSetting(std::unique_ptr<UserSetting> setting);
|
void AddSetting(std::unique_ptr<UserSetting> setting);
|
||||||
UserSetting* GetSetting(uint32_t setting_id);
|
UserSetting* GetSetting(uint32_t setting_id);
|
||||||
|
|
|
@ -510,7 +510,8 @@ dword_result_t XamUserGetMembershipTier_entry(dword_t user_index) {
|
||||||
if (!kernel_state()->xam_state()->IsUserSignedIn(user_index)) {
|
if (!kernel_state()->xam_state()->IsUserSignedIn(user_index)) {
|
||||||
return X_ERROR_NO_SUCH_USER;
|
return X_ERROR_NO_SUCH_USER;
|
||||||
}
|
}
|
||||||
return 6 /* 6 appears to be Gold */;
|
|
||||||
|
return X_XAMACCOUNTINFO::AccountSubscriptionTier::kSubscriptionTierGold;
|
||||||
}
|
}
|
||||||
DECLARE_XAM_EXPORT1(XamUserGetMembershipTier, kUserProfiles, kStub);
|
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);
|
DECLARE_XAM_EXPORT1(XamUserIsUnsafeProgrammingAllowed, kUserProfiles, kStub);
|
||||||
|
|
||||||
dword_result_t XamUserGetSubscriptionType_entry(dword_t user_index,
|
dword_result_t XamUserGetSubscriptionType_entry(dword_t user_index,
|
||||||
dword_t unk2, dword_t unk3,
|
dword_t unk2, dword_t unk3) {
|
||||||
dword_t unk4, dword_t unk5,
|
if (user_index >= XUserMaxUserCount) {
|
||||||
dword_t unk6) {
|
return X_ERROR_INVALID_PARAMETER;
|
||||||
if (!unk2 || !unk3 || user_index >= XUserMaxUserCount) {
|
}
|
||||||
|
|
||||||
|
if (!unk2 || !unk3) {
|
||||||
return X_E_INVALIDARG;
|
return X_E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return X_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
DECLARE_XAM_EXPORT1(XamUserGetSubscriptionType, kUserProfiles, kStub);
|
DECLARE_XAM_EXPORT1(XamUserGetSubscriptionType, kUserProfiles, kStub);
|
||||||
|
|
||||||
|
|
|
@ -589,6 +589,7 @@ struct X_XAMACCOUNTINFO {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AccountSubscriptionTier {
|
enum AccountSubscriptionTier {
|
||||||
|
kSubscriptionTierNone = 0,
|
||||||
kSubscriptionTierSilver = 3,
|
kSubscriptionTierSilver = 3,
|
||||||
kSubscriptionTierGold = 6,
|
kSubscriptionTierGold = 6,
|
||||||
kSubscriptionTierFamilyGold = 9
|
kSubscriptionTierFamilyGold = 9
|
||||||
|
|
Loading…
Reference in New Issue