Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use simpler C00 unlock EDAT check in GUI #11606

Merged
merged 1 commit into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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