Skip to content

Commit

Permalink
Use simpler C00 unlock EDAT check in GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
NicknineTheEagle authored and Nekotekina committed Mar 9, 2022
1 parent 59a0cf9 commit 1670769
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions rpcs3/Emu/system_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ namespace rpcs3::utils
return edat_path;
}

bool verify_c00_unlock_edat(const std::string_view& content_id)
bool verify_c00_unlock_edat(const std::string_view& content_id, bool fast)
{
const std::string edat_path = rpcs3::utils::get_c00_unlock_edat_path(content_id);

Expand All @@ -239,6 +239,10 @@ namespace rpcs3::utils
return false;
}

// Use simple check for GUI
if (fast)
return true;

u128 k_licensee = get_default_self_klic();
std::string edat_content_id;

Expand Down Expand Up @@ -325,10 +329,10 @@ 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(content_id))
if (fs::is_file(game_path + "/C00/PARAM.SFO") && verify_c00_unlock_edat(content_id, true))
{
// Load full game data.
sys_log.notice("Verified EDAT file %s.edat for trial game %s", content_id, c00_title_id);
sys_log.notice("Found EDAT file %s.edat for trial game %s", content_id, c00_title_id);
return game_path + "/C00";
}
}
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/system_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,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& content_id);
bool verify_c00_unlock_edat(const std::string_view& content_id, bool fast = false);
std::string get_sfo_dir_from_game_path(const std::string& game_path, const std::string& title_id = "");

std::string get_custom_config_dir();
Expand Down

0 comments on commit 1670769

Please sign in to comment.