mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-12 23:16:40 +00:00
boot2: update for 10.0.0
This commit is contained in:
parent
353e27b9e2
commit
8547802904
1 changed files with 21 additions and 9 deletions
|
@ -39,6 +39,7 @@ namespace ams::boot2 {
|
||||||
ncm::SystemProgramId::NvServices, /* nvservices */
|
ncm::SystemProgramId::NvServices, /* nvservices */
|
||||||
ncm::SystemProgramId::NvnFlinger, /* nvnflinger */
|
ncm::SystemProgramId::NvnFlinger, /* nvnflinger */
|
||||||
ncm::SystemProgramId::Vi, /* vi */
|
ncm::SystemProgramId::Vi, /* vi */
|
||||||
|
ncm::SystemProgramId::Pgl, /* pgl */
|
||||||
ncm::SystemProgramId::Ns, /* ns */
|
ncm::SystemProgramId::Ns, /* ns */
|
||||||
ncm::SystemProgramId::LogManager, /* lm */
|
ncm::SystemProgramId::LogManager, /* lm */
|
||||||
ncm::SystemProgramId::Ppc, /* ppc */
|
ncm::SystemProgramId::Ppc, /* ppc */
|
||||||
|
@ -84,6 +85,7 @@ namespace ams::boot2 {
|
||||||
ncm::SystemProgramId::NvServices, /* nvservices */
|
ncm::SystemProgramId::NvServices, /* nvservices */
|
||||||
ncm::SystemProgramId::NvnFlinger, /* nvnflinger */
|
ncm::SystemProgramId::NvnFlinger, /* nvnflinger */
|
||||||
ncm::SystemProgramId::Vi, /* vi */
|
ncm::SystemProgramId::Vi, /* vi */
|
||||||
|
ncm::SystemProgramId::Pgl, /* pgl */
|
||||||
ncm::SystemProgramId::Ns, /* ns */
|
ncm::SystemProgramId::Ns, /* ns */
|
||||||
ncm::SystemProgramId::LogManager, /* lm */
|
ncm::SystemProgramId::LogManager, /* lm */
|
||||||
ncm::SystemProgramId::Ppc, /* ppc */
|
ncm::SystemProgramId::Ppc, /* ppc */
|
||||||
|
@ -133,9 +135,18 @@ namespace ams::boot2 {
|
||||||
return c == '\r' || c == '\n';
|
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) {
|
void LaunchProgram(os::ProcessId *out_process_id, const ncm::ProgramLocation &loc, u32 launch_flags) {
|
||||||
os::ProcessId process_id = os::InvalidProcessId;
|
os::ProcessId process_id = os::InvalidProcessId;
|
||||||
|
|
||||||
|
/* Only launch the process if we're allowed to. */
|
||||||
|
if (IsAllowedLaunchProgram(loc)) {
|
||||||
/* Launch, lightly validate result. */
|
/* Launch, lightly validate result. */
|
||||||
{
|
{
|
||||||
const auto launch_result = pm::shell::LaunchProgram(&process_id, loc, launch_flags);
|
const auto launch_result = pm::shell::LaunchProgram(&process_id, loc, launch_flags);
|
||||||
|
@ -148,6 +159,7 @@ namespace ams::boot2 {
|
||||||
*out_process_id = process_id;
|
*out_process_id = process_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void LaunchList(const ncm::SystemProgramId *launch_list, size_t num_entries) {
|
void LaunchList(const ncm::SystemProgramId *launch_list, size_t num_entries) {
|
||||||
for (size_t i = 0; i < num_entries; i++) {
|
for (size_t i = 0; i < num_entries; i++) {
|
||||||
|
|
Loading…
Reference in a new issue