mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-05-07 13:37:46 +00:00
Move multi-game ISO parsing code path to proper location
This commit is contained in:
parent
a6fb0c8931
commit
773808169e
1 changed files with 32 additions and 36 deletions
|
|
@ -861,7 +861,38 @@ void game_list_frame::OnParsingFinished()
|
|||
{
|
||||
if (is_iso_file(entry.path))
|
||||
{
|
||||
push_path(entry.path, legit_paths);
|
||||
iso_archive archive(entry.path);
|
||||
const iso_fs_node& root = archive.root();
|
||||
const std::regex ps3_gm_regex("^PS3_GM[[:digit:]]{2}$");
|
||||
bool found = false;
|
||||
|
||||
for (const auto& child : root.children)
|
||||
{
|
||||
if (m_refresh_watcher.isCanceled())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (!child->metadata.is_directory)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const std::string& name = child->metadata.name;
|
||||
|
||||
if (name == "PS3_GAME" || std::regex_match(name, ps3_gm_regex))
|
||||
{
|
||||
add_game(entry.path, name);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
add_game(entry.path);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else if (fs::is_file(entry.path + "/PARAM.SFO"))
|
||||
{
|
||||
|
|
@ -896,41 +927,6 @@ void game_list_frame::OnParsingFinished()
|
|||
|
||||
add_disc_dir(entry.path, legit_paths);
|
||||
}
|
||||
else if (is_iso_file(entry.path))
|
||||
{
|
||||
iso_archive archive(entry.path);
|
||||
const iso_fs_node& root = archive.root();
|
||||
const std::regex ps3_gm_regex("^PS3_GM[[:digit:]]{2}$");
|
||||
bool found = false;
|
||||
|
||||
for (const auto& child : root.children)
|
||||
{
|
||||
if (m_refresh_watcher.isCanceled())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (!child->metadata.is_directory)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const std::string& name = child->metadata.name;
|
||||
|
||||
if (name == "PS3_GAME" || std::regex_match(name, ps3_gm_regex))
|
||||
{
|
||||
add_game(entry.path, name);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
add_game(entry.path);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
game_list_log.trace("Invalid game path registered: %s", entry.path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue