mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 18:58:36 +12:00
TROPUSR: Loader Improvements
* Replace invalid TROPUSR.DAT with empty new ones. (+report an error) * Fix return code of Load whenever TROPUSR.DAT hadn't existed before. * Add header magic test. * sceNpTrophyRegisterContext will abort if TROPUSR.DAT generation failed.
This commit is contained in:
parent
1f93fc902b
commit
48870f3e8b
4 changed files with 49 additions and 17 deletions
|
@ -578,11 +578,11 @@ error_code sceNpTrophyRegisterContext(ppu_thread& ppu, u32 context, u32 handle,
|
|||
return SCE_NP_TROPHY_ERROR_ILLEGAL_UPDATE;
|
||||
}
|
||||
|
||||
TROPUSRLoader* tropusr = new TROPUSRLoader();
|
||||
const auto& tropusr = ctxt->tropusr = std::make_unique<TROPUSRLoader>();
|
||||
const std::string trophyUsrPath = trophyPath + "/TROPUSR.DAT";
|
||||
const std::string trophyConfPath = trophyPath + "/TROPCONF.SFM";
|
||||
tropusr->Load(trophyUsrPath, trophyConfPath);
|
||||
ctxt->tropusr.reset(tropusr);
|
||||
|
||||
ensure(tropusr->Load(trophyUsrPath, trophyConfPath).success);
|
||||
|
||||
// This emulates vsh sending the events and ensures that not 2 events are processed at once
|
||||
const std::pair<u32, s32> statuses[] =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue