[Kernel] Add GpdFile::GetTitleId() member
This commit is contained in:
parent
69eca79402
commit
00cffcacbb
|
@ -350,6 +350,8 @@ class SpaFile : public XdbfFile {
|
|||
|
||||
class GpdFile : public XdbfFile {
|
||||
public:
|
||||
GpdFile(uint32_t title_id) : title_id_(title_id) {}
|
||||
|
||||
bool GetAchievement(uint16_t id, XdbfAchievement* dest);
|
||||
uint32_t GetAchievements(std::vector<XdbfAchievement>* achievements) const;
|
||||
|
||||
|
@ -361,6 +363,11 @@ class GpdFile : public XdbfFile {
|
|||
|
||||
// Updates (or adds) a title
|
||||
bool UpdateTitle(XdbfTitlePlayed title);
|
||||
|
||||
uint32_t GetTitleId() { return title_id_; }
|
||||
|
||||
private:
|
||||
uint32_t title_id_ = -1;
|
||||
};
|
||||
|
||||
} // namespace util
|
||||
|
|
|
@ -131,7 +131,7 @@ void UserProfile::LoadGpdFiles() {
|
|||
continue;
|
||||
}
|
||||
|
||||
util::GpdFile title_gpd;
|
||||
util::GpdFile title_gpd(title.title_id);
|
||||
bool result = title_gpd.Read(mmap_->data(), mmap_->size());
|
||||
mmap_->Close();
|
||||
|
||||
|
@ -221,7 +221,7 @@ util::GpdFile* UserProfile::SetTitleSpaData(const util::SpaFile& spa_data) {
|
|||
title_info.last_played = Clock::QueryHostSystemTime();
|
||||
|
||||
// Copy cheevos from SPA -> GPD
|
||||
util::GpdFile title_gpd;
|
||||
util::GpdFile title_gpd(spa_title);
|
||||
for (auto ach : spa_achievements) {
|
||||
title_gpd.UpdateAchievement(ach);
|
||||
|
||||
|
|
Loading…
Reference in New Issue