MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / tryUnlockGame

Function tryUnlockGame

android/src/rpcsx-android.cpp:685–705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

683}
684
685static bool tryUnlockGame(const psf::registry &psf) {
686 auto contentId = psf::get_string(psf, "CONTENT_ID");
687
688 if (contentId.empty()) {
689 return true;
690 }
691
692 const auto licenseDir = fmt::format(
693 "%shome/%s/exdata/", rpcs3::utils::get_hdd0_dir(), Emu.GetUsr());
694
695 const auto licenseFile = fmt::format("%s%s", licenseDir, contentId);
696 if (std::filesystem::is_regular_file(licenseFile + ".rap")) {
697 return true;
698 }
699
700 if (std::filesystem::is_regular_file(licenseFile + ".edat")) {
701 return true;
702 }
703
704 return false;
705}
706
707static void collectGamePaths(std::vector<std::string> &paths,
708 const std::string &rootDir) {

Callers 1

fetchGameInfoFunction · 0.85

Calls 4

get_stringFunction · 0.85
get_hdd0_dirFunction · 0.85
formatEnum · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected