mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 09:39:55 +00:00
edat: Check for the correct directory
This commit is contained in:
parent
1f8f428a59
commit
c995505023
@ -553,7 +553,7 @@ error_code npDrmVerifyUpgradeLicense(vm::cptr<char> content_id)
|
||||
const std::string content_str(content_id.get_ptr(), std::find(content_id.get_ptr(), content_id.get_ptr() + 0x2f, '\0'));
|
||||
sceNp.warning("npDrmVerifyUpgradeLicense(): content_id='%s'", content_id);
|
||||
|
||||
if (!rpcs3::utils::verify_c00_unlock_edat(Emu.GetTitleID(), content_str))
|
||||
if (!rpcs3::utils::verify_c00_unlock_edat(content_str))
|
||||
return SCE_NP_DRM_ERROR_LICENSE_NOT_FOUND;
|
||||
|
||||
return CELL_OK;
|
||||
|
@ -157,7 +157,7 @@ namespace rpcs3::utils
|
||||
return rap_path;
|
||||
}
|
||||
|
||||
std::string get_c00_unlock_edat_path(const std::string_view& title_id, const std::string_view& content_id)
|
||||
std::string get_c00_unlock_edat_path(const std::string_view& content_id)
|
||||
{
|
||||
const std::string home_dir = get_hdd0_dir() + "home";
|
||||
|
||||
@ -167,7 +167,7 @@ namespace rpcs3::utils
|
||||
{
|
||||
if (entry.is_directory && check_user(entry.name))
|
||||
{
|
||||
edat_path = fmt::format("%s/%s/exdata/%s/%s.edat", home_dir, entry.name, title_id, content_id);
|
||||
edat_path = fmt::format("%s/%s/exdata/%s.edat", home_dir, entry.name, content_id);
|
||||
if (fs::is_file(edat_path))
|
||||
{
|
||||
return edat_path;
|
||||
@ -179,9 +179,9 @@ namespace rpcs3::utils
|
||||
return edat_path;
|
||||
}
|
||||
|
||||
bool verify_c00_unlock_edat(const std::string_view& title_id, const std::string_view& content_id)
|
||||
bool verify_c00_unlock_edat(const std::string_view& content_id)
|
||||
{
|
||||
const std::string edat_path = rpcs3::utils::get_c00_unlock_edat_path(title_id, content_id);
|
||||
const std::string edat_path = rpcs3::utils::get_c00_unlock_edat_path(content_id);
|
||||
|
||||
// Check if user has unlock EDAT installed
|
||||
if (!fs::is_file(edat_path))
|
||||
@ -287,7 +287,7 @@ namespace rpcs3::utils
|
||||
// This is a trial game. Check if the user has EDAT file to unlock it.
|
||||
const auto c00_title_id = psf::get_string(psf, "TITLE_ID");
|
||||
|
||||
if (fs::is_file(game_path + "/C00/PARAM.SFO") && verify_c00_unlock_edat(c00_title_id, content_id))
|
||||
if (fs::is_file(game_path + "/C00/PARAM.SFO") && verify_c00_unlock_edat(content_id))
|
||||
{
|
||||
// Load full game data.
|
||||
sys_log.notice("Verified EDAT file %s.edat for trial game %s", content_id, c00_title_id);
|
||||
|
@ -23,7 +23,7 @@ namespace rpcs3::utils
|
||||
std::string get_cache_dir();
|
||||
|
||||
std::string get_rap_file_path(const std::string_view& rap);
|
||||
bool verify_c00_unlock_edat(const std::string_view& title_id, const std::string_view& content_id);
|
||||
bool verify_c00_unlock_edat(const std::string_view& content_id);
|
||||
std::string get_sfo_dir_from_game_path(const std::string& game_path, const std::string& title_id = "");
|
||||
|
||||
std::string get_custom_config_dir();
|
||||
|
Loading…
x
Reference in New Issue
Block a user