2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

drd: Load title ID from program metadata

Previously only loaded from control metadata
This commit is contained in:
Zach Hilman 2018-08-25 11:44:52 -04:00
parent b555311438
commit a040929c90

View file

@ -61,7 +61,6 @@ AppLoader_DeconstructedRomDirectory::AppLoader_DeconstructedRomDirectory(FileSys
if (nacp_file != nullptr) { if (nacp_file != nullptr) {
FileSys::NACP nacp(nacp_file); FileSys::NACP nacp(nacp_file);
title_id = nacp.GetTitleId();
name = nacp.GetApplicationName(); name = nacp.GetApplicationName();
} }
} }
@ -120,6 +119,7 @@ ResultStatus AppLoader_DeconstructedRomDirectory::Load(
} }
auto& kernel = Core::System::GetInstance().Kernel(); auto& kernel = Core::System::GetInstance().Kernel();
title_id = metadata.GetTitleID();
process->program_id = metadata.GetTitleID(); process->program_id = metadata.GetTitleID();
process->svc_access_mask.set(); process->svc_access_mask.set();
process->resource_limit = process->resource_limit =
@ -159,8 +159,6 @@ ResultStatus AppLoader_DeconstructedRomDirectory::ReadIcon(std::vector<u8>& buff
} }
ResultStatus AppLoader_DeconstructedRomDirectory::ReadProgramId(u64& out_program_id) { ResultStatus AppLoader_DeconstructedRomDirectory::ReadProgramId(u64& out_program_id) {
if (name.empty())
return ResultStatus::ErrorNoControl;
out_program_id = title_id; out_program_id = title_id;
return ResultStatus::Success; return ResultStatus::Success;
} }