mirror of https://github.com/PCSX2/pcsx2.git
GameList: Add region string/fix cached progress increment
This commit is contained in:
parent
068ab8ab36
commit
f260a8be66
|
@ -86,6 +86,13 @@ const char* GameList::EntryTypeToString(EntryType type)
|
|||
return names[static_cast<int>(type)];
|
||||
}
|
||||
|
||||
const char* GameList::RegionToString(Region region)
|
||||
{
|
||||
static std::array<const char*, static_cast<int>(Region::Count)> names = {
|
||||
{"NTSC-U/C", "NTSC-J", "PAL", "Other"}};
|
||||
return names[static_cast<int>(region)];
|
||||
}
|
||||
|
||||
const char* GameList::EntryCompatibilityRatingToString(CompatibilityRating rating)
|
||||
{
|
||||
// clang-format off
|
||||
|
@ -497,11 +504,11 @@ void GameList::ScanDirectory(const char* path, bool recursive, const std::vector
|
|||
|
||||
{
|
||||
std::unique_lock lock(s_mutex);
|
||||
if (GetEntryForPath(ffd.FileName.c_str()))
|
||||
continue;
|
||||
|
||||
if (AddFileFromCache(ffd.FileName, ffd.ModificationTime))
|
||||
if (GetEntryForPath(ffd.FileName.c_str()) || AddFileFromCache(ffd.FileName, ffd.ModificationTime))
|
||||
{
|
||||
progress->IncrementProgressValue();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// ownership of fp is transferred
|
||||
|
|
|
@ -69,6 +69,7 @@ namespace GameList
|
|||
};
|
||||
|
||||
const char* EntryTypeToString(EntryType type);
|
||||
const char* RegionToString(Region region);
|
||||
const char* EntryCompatibilityRatingToString(CompatibilityRating rating);
|
||||
|
||||
bool IsScannableFilename(const std::string& path);
|
||||
|
|
Loading…
Reference in New Issue