[XAM] Added option to remove titles with 0 achievements unlocked
This commit is contained in:
committed by
Radosław Gliński
parent
4e8e789876
commit
70364e73ae
@@ -135,6 +135,7 @@ class GpdInfo : public XdbfFile {
|
||||
const GpdSection section);
|
||||
|
||||
void UpsertEntry(Entry* entry);
|
||||
void DeleteEntry(const Entry* entry);
|
||||
|
||||
uint32_t FindFreeLocation(const uint32_t entry_size);
|
||||
|
||||
@@ -144,7 +145,6 @@ class GpdInfo : public XdbfFile {
|
||||
uint32_t title_id_ = 0;
|
||||
|
||||
void InsertEntry(Entry* entry);
|
||||
void DeleteEntry(const Entry* entry);
|
||||
|
||||
std::vector<const Entry*> GetSortedEntries() const;
|
||||
|
||||
|
||||
@@ -88,6 +88,17 @@ void GpdInfoProfile::AddNewTitle(const SpaInfo* title_data) {
|
||||
UpsertEntry(&entry);
|
||||
}
|
||||
|
||||
bool GpdInfoProfile::RemoveTitle(const uint32_t title_id) {
|
||||
const Entry* entry =
|
||||
GetEntry(static_cast<uint16_t>(GpdSection::kTitle), title_id);
|
||||
if (!entry) {
|
||||
return false;
|
||||
}
|
||||
|
||||
DeleteEntry(entry);
|
||||
return true;
|
||||
}
|
||||
|
||||
X_XDBF_GPD_TITLE_PLAYED GpdInfoProfile::FillTitlePlayedData(
|
||||
const SpaInfo* title_data) const {
|
||||
X_XDBF_GPD_TITLE_PLAYED title_gpd_data = {};
|
||||
|
||||
@@ -32,6 +32,7 @@ class GpdInfoProfile : public GpdInfo {
|
||||
~GpdInfoProfile() = default;
|
||||
|
||||
void AddNewTitle(const SpaInfo* title_data);
|
||||
bool RemoveTitle(const uint32_t title_id);
|
||||
void UpdateTitleInfo(const uint32_t title_id,
|
||||
X_XDBF_GPD_TITLE_PLAYED* title_data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user