mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-10 06:01:52 +00:00
cs: fix launching of tio server
This commit is contained in:
parent
a595091be0
commit
f2da92184b
3 changed files with 9 additions and 6 deletions
|
@ -29,7 +29,11 @@ namespace ams::scs {
|
|||
Result RegisterSocket(s32 socket, u64 id);
|
||||
void UnregisterSocket(s32 socket);
|
||||
|
||||
Result LaunchProgram(os::ProcessId *out, ncm::ProgramId program_id, const void *args, size_t args_size, u32 process_flags);
|
||||
Result LaunchProgram(os::ProcessId *out, const ncm::ProgramLocation &loc, const void *args, size_t args_size, u32 process_flags);
|
||||
|
||||
inline Result LaunchProgram(os::ProcessId *out, ncm::ProgramId program_id, const void *args, size_t args_size, u32 process_flags) {
|
||||
return LaunchProgram(out, ncm::ProgramLocation::Make(program_id, ncm::StorageId::BuiltInSystem), args, args_size, process_flags);
|
||||
}
|
||||
|
||||
Result SubscribeProcessEvent(s32 socket, bool is_register, u64 id);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace ams::cs {
|
|||
void InitializeTargetIoServer() {
|
||||
/* Launch target io server. */
|
||||
os::ProcessId process_id;
|
||||
scs::LaunchProgram(std::addressof(process_id), ncm::SystemProgramId::DevServer, nullptr, 0, 0);
|
||||
scs::LaunchProgram(std::addressof(process_id), ncm::ProgramLocation::Make(ncm::SystemProgramId::DevServer, ncm::StorageId::None), nullptr, 0, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -380,15 +380,14 @@ namespace ams::scs {
|
|||
return g_socket_info_manager.Unregister(socket);
|
||||
}
|
||||
|
||||
Result LaunchProgram(os::ProcessId *out, ncm::ProgramId program_id, const void *args, size_t args_size, u32 process_flags) {
|
||||
Result LaunchProgram(os::ProcessId *out, const ncm::ProgramLocation &loc, const void *args, size_t args_size, u32 process_flags) {
|
||||
/* Set up the arguments. */
|
||||
PrepareToLaunchProgram(program_id, args, args_size);
|
||||
PrepareToLaunchProgram(loc.program_id, args, args_size);
|
||||
|
||||
/* Ensure arguments are managed correctly. */
|
||||
ON_SCOPE_EXIT { FlushProgramArgument(program_id); };
|
||||
ON_SCOPE_EXIT { FlushProgramArgument(loc.program_id); };
|
||||
|
||||
/* Launch the program. */
|
||||
const ncm::ProgramLocation loc = ncm::ProgramLocation::Make(program_id, ncm::StorageId::BuiltInSystem);
|
||||
R_TRY(pgl::LaunchProgram(out, loc, process_flags | pm::LaunchFlags_SignalOnExit, 0));
|
||||
|
||||
return ResultSuccess();
|
||||
|
|
Loading…
Reference in a new issue