From 2d6e81ed651f283dbbc69aa7ff1f1298f73576e9 Mon Sep 17 00:00:00 2001 From: Gliniak Date: Mon, 23 Dec 2019 09:18:56 +0100 Subject: [PATCH] [User] Removed hardcode from XPROFILE_GAMERCARD_TITLES_PLAYED (Now dashboard 9199 shows more reliable amount of games played) --- src/xenia/kernel/xam/user_profile.cc | 3 ++- src/xenia/kernel/xam/user_profile.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xenia/kernel/xam/user_profile.cc b/src/xenia/kernel/xam/user_profile.cc index 624e27ae9..eb2e4bade 100644 --- a/src/xenia/kernel/xam/user_profile.cc +++ b/src/xenia/kernel/xam/user_profile.cc @@ -131,7 +131,8 @@ UserProfile::UserProfile() : dash_gpd_(kDashboardID) { // XPROFILE_GAMERCARD_MOTTO AddSetting(std::make_unique(0x402C0011, L"")); // XPROFILE_GAMERCARD_TITLES_PLAYED - AddSetting(std::make_unique(0x10040012, 1)); + AddSetting( + std::make_unique(0x10040012, GetAmountOfPlayedTitles())); // XPROFILE_GAMERCARD_ACHIEVEMENTS_EARNED AddSetting(std::make_unique(0x10040013, 0)); // XPROFILE_GAMER_DIFFICULTY diff --git a/src/xenia/kernel/xam/user_profile.h b/src/xenia/kernel/xam/user_profile.h index 43c7d469b..fdd6bc822 100644 --- a/src/xenia/kernel/xam/user_profile.h +++ b/src/xenia/kernel/xam/user_profile.h @@ -318,6 +318,7 @@ class UserProfile { std::string name() const { return account_.GetGamertagString(); } // uint32_t signin_state() const { return 1; } uint32_t CalculateUserGamerscore() const; + uint32_t GetAmountOfPlayedTitles() const { return (uint32_t)title_gpds_.size(); } void AddSetting(std::unique_ptr setting); Setting* GetSetting(uint32_t setting_id);