Merge pull request #7279 from Morph1984/system-get-program-id

general: Get the current process program id directly from the system
This commit is contained in:
Morph 2021-11-04 20:34:20 -04:00 committed by GitHub
commit 3a71ff44f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 48 additions and 59 deletions

View file

@ -349,7 +349,7 @@ struct System::Impl {
}
Service::Glue::ApplicationLaunchProperty launch{};
launch.title_id = process.GetTitleID();
launch.title_id = process.GetProgramID();
FileSys::PatchManager pm{launch.title_id, fs_controller, *content_provider};
launch.version = pm.GetGameVersion().value_or(0);
@ -639,6 +639,10 @@ const Core::SpeedLimiter& System::SpeedLimiter() const {
return impl->speed_limiter;
}
u64 System::GetCurrentProcessProgramID() const {
return impl->kernel.CurrentProcess()->GetProgramID();
}
Loader::ResultStatus System::GetGameName(std::string& out) const {
return impl->GetGameName(out);
}