mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 15:05:59 +00:00
overlays: don't check for hdd dirs if we play a disc game
This commit is contained in:
parent
4c742f7742
commit
b4f453f687
4 changed files with 8 additions and 39 deletions
|
|
@ -340,7 +340,7 @@ namespace rpcs3::utils
|
|||
return get_input_config_dir(title_id) + g_cfg_input_configs.default_config + ".yml";
|
||||
}
|
||||
|
||||
std::string get_game_content_path(game_content_type type, game_content_dir_type& dir_type)
|
||||
std::string get_game_content_path(game_content_type type)
|
||||
{
|
||||
const std::string locale_suffix = fmt::format("_%02d", static_cast<s32>(g_cfg.sys.language.get()));
|
||||
const std::string disc_dir = vfs::get("/dev_bdvd/PS3_GAME");
|
||||
|
|
@ -351,14 +351,11 @@ namespace rpcs3::utils
|
|||
hdd0_dir.clear(); // No hdd0 dir
|
||||
}
|
||||
|
||||
const bool is_disc_game = !disc_dir.empty();
|
||||
const bool check_disc = is_disc_game && dir_type != game_content_dir_type::dev_hdd0;
|
||||
const bool check_disc = !disc_dir.empty();
|
||||
const bool check_hdd0 = !hdd0_dir.empty() && !check_disc;
|
||||
|
||||
const auto find_content = [&](const std::string& name, const std::string& extension) -> std::string
|
||||
{
|
||||
// ICON0.PNG is not supposed to be updateable, so we can ignore the hdd0 dir for disc games in that case
|
||||
const bool check_hdd0 = !hdd0_dir.empty() && dir_type != game_content_dir_type::dev_bdvd && !(is_disc_game && name == "ICON0");
|
||||
|
||||
// Check localized content first
|
||||
for (bool localized : { true, false })
|
||||
{
|
||||
|
|
@ -369,7 +366,6 @@ namespace rpcs3::utils
|
|||
{
|
||||
if (std::string path = hdd0_dir + filename; fs::is_file(path))
|
||||
{
|
||||
dir_type = game_content_dir_type::dev_hdd0;
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
|
@ -379,13 +375,11 @@ namespace rpcs3::utils
|
|||
{
|
||||
if (std::string path = disc_dir + filename; fs::is_file(path))
|
||||
{
|
||||
dir_type = game_content_dir_type::dev_bdvd;
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dir_type = game_content_dir_type::any;
|
||||
return {};
|
||||
};
|
||||
|
||||
|
|
@ -414,7 +408,6 @@ namespace rpcs3::utils
|
|||
// Try to find a custom background first
|
||||
if (std::string path = fs::get_config_dir() + "/Icons/game_icons/" + Emu.GetTitleID() + "/PIC1.PNG"; fs::is_file(path))
|
||||
{
|
||||
dir_type = game_content_dir_type::any;
|
||||
return path;
|
||||
}
|
||||
|
||||
|
|
@ -423,7 +416,6 @@ namespace rpcs3::utils
|
|||
}
|
||||
}
|
||||
|
||||
dir_type = game_content_dir_type::any;
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue