diff --git a/rpcs3/Loader/TROPUSR.cpp b/rpcs3/Loader/TROPUSR.cpp index f4022b3aab..37be06bb3e 100644 --- a/rpcs3/Loader/TROPUSR.cpp +++ b/rpcs3/Loader/TROPUSR.cpp @@ -202,6 +202,19 @@ u32 TROPUSRLoader::GetTrophiesCount() return (u32)m_table6.size(); } +u32 TROPUSRLoader::GetUnlockedTrophiesCount() +{ + u32 count = 0; + for (const auto& trophy : m_table6) + { + if (trophy.trophy_state) + { + count++; + } + } + return count; +} + u32 TROPUSRLoader::GetTrophyUnlockState(u32 id) { if (id >= m_table6.size()) diff --git a/rpcs3/Loader/TROPUSR.h b/rpcs3/Loader/TROPUSR.h index f2028dbb00..d69da9af34 100644 --- a/rpcs3/Loader/TROPUSR.h +++ b/rpcs3/Loader/TROPUSR.h @@ -73,6 +73,7 @@ public: virtual bool Save(const std::string& filepath); virtual u32 GetTrophiesCount(); + virtual u32 GetUnlockedTrophiesCount(); virtual u32 GetTrophyUnlockState(u32 id); virtual u64 GetTrophyTimestamp(u32 id);