GameList: Fix cache getting corrupted from unknown games
This commit is contained in:
parent
e293c22cde
commit
bf6faafc54
|
@ -283,6 +283,7 @@ bool GameList::GetExeListEntry(const char* path, GameListEntry* entry)
|
||||||
entry->total_size = ZeroExtend64(file_size);
|
entry->total_size = ZeroExtend64(file_size);
|
||||||
entry->last_modified_time = ffd.ModificationTime.AsUnixTimestamp();
|
entry->last_modified_time = ffd.ModificationTime.AsUnixTimestamp();
|
||||||
entry->type = GameListEntryType::PSExe;
|
entry->type = GameListEntryType::PSExe;
|
||||||
|
entry->compatibility_rating = GameListCompatibilityRating::Unknown;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -306,6 +307,7 @@ bool GameList::GetGameListEntry(const std::string& path, GameListEntry* entry)
|
||||||
entry->region = region;
|
entry->region = region;
|
||||||
entry->total_size = static_cast<u64>(CDImage::RAW_SECTOR_SIZE) * static_cast<u64>(cdi->GetLBACount());
|
entry->total_size = static_cast<u64>(CDImage::RAW_SECTOR_SIZE) * static_cast<u64>(cdi->GetLBACount());
|
||||||
entry->type = GameListEntryType::Disc;
|
entry->type = GameListEntryType::Disc;
|
||||||
|
entry->compatibility_rating = GameListCompatibilityRating::Unknown;
|
||||||
cdi.reset();
|
cdi.reset();
|
||||||
|
|
||||||
if (entry->code.empty())
|
if (entry->code.empty())
|
||||||
|
@ -332,13 +334,9 @@ bool GameList::GetGameListEntry(const std::string& path, GameListEntry* entry)
|
||||||
|
|
||||||
const GameListCompatibilityEntry* compatibility_entry = GetCompatibilityEntryForCode(entry->code);
|
const GameListCompatibilityEntry* compatibility_entry = GetCompatibilityEntryForCode(entry->code);
|
||||||
if (compatibility_entry)
|
if (compatibility_entry)
|
||||||
{
|
|
||||||
entry->compatibility_rating = compatibility_entry->compatibility_rating;
|
entry->compatibility_rating = compatibility_entry->compatibility_rating;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
Log_WarningPrintf("'%s' (%s) not found in compatibility list", entry->code.c_str(), entry->title.c_str());
|
Log_WarningPrintf("'%s' (%s) not found in compatibility list", entry->code.c_str(), entry->title.c_str());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FILESYSTEM_STAT_DATA ffd;
|
FILESYSTEM_STAT_DATA ffd;
|
||||||
|
@ -1161,7 +1159,7 @@ std::string GameList::ExportCompatibilityEntry(const GameListCompatibilityEntry*
|
||||||
InitElementForCompatibilityEntry(&doc, entry_elem, entry);
|
InitElementForCompatibilityEntry(&doc, entry_elem, entry);
|
||||||
|
|
||||||
tinyxml2::XMLPrinter printer;
|
tinyxml2::XMLPrinter printer;
|
||||||
//doc.Print(&printer);
|
// doc.Print(&printer);
|
||||||
entry_elem->Accept(&printer);
|
entry_elem->Accept(&printer);
|
||||||
return std::string(printer.CStr(), printer.CStrSize());
|
return std::string(printer.CStr(), printer.CStrSize());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue