1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-18 08:22:04 +00:00

boot2: update for 10.0.0

This commit is contained in:
Michael Scire 2020-04-14 03:30:03 -07:00
parent 353e27b9e2
commit 8547802904

View file

@ -39,6 +39,7 @@ namespace ams::boot2 {
ncm::SystemProgramId::NvServices, /* nvservices */
ncm::SystemProgramId::NvnFlinger, /* nvnflinger */
ncm::SystemProgramId::Vi, /* vi */
ncm::SystemProgramId::Pgl, /* pgl */
ncm::SystemProgramId::Ns, /* ns */
ncm::SystemProgramId::LogManager, /* lm */
ncm::SystemProgramId::Ppc, /* ppc */
@ -84,6 +85,7 @@ namespace ams::boot2 {
ncm::SystemProgramId::NvServices, /* nvservices */
ncm::SystemProgramId::NvnFlinger, /* nvnflinger */
ncm::SystemProgramId::Vi, /* vi */
ncm::SystemProgramId::Pgl, /* pgl */
ncm::SystemProgramId::Ns, /* ns */
ncm::SystemProgramId::LogManager, /* lm */
ncm::SystemProgramId::Ppc, /* ppc */
@ -133,9 +135,18 @@ namespace ams::boot2 {
return c == '\r' || c == '\n';
}
inline bool IsAllowedLaunchProgram(const ncm::ProgramLocation &loc) {
if (loc.program_id == ncm::SystemProgramId::Pgl) {
return hos::GetVersion() >= hos::Version_10_0_0;
}
return true;
}
void LaunchProgram(os::ProcessId *out_process_id, const ncm::ProgramLocation &loc, u32 launch_flags) {
os::ProcessId process_id = os::InvalidProcessId;
/* Only launch the process if we're allowed to. */
if (IsAllowedLaunchProgram(loc)) {
/* Launch, lightly validate result. */
{
const auto launch_result = pm::shell::LaunchProgram(&process_id, loc, launch_flags);
@ -148,6 +159,7 @@ namespace ams::boot2 {
*out_process_id = process_id;
}
}
}
void LaunchList(const ncm::SystemProgramId *launch_list, size_t num_entries) {
for (size_t i = 0; i < num_entries; i++) {