pgl: fix argument order for LaunchProgram on 12.x

This commit is contained in:
Michael Scire 2021-04-20 01:02:33 -07:00 committed by fincs
parent 5509f8f14b
commit f7df9d578c

View File

@ -83,15 +83,21 @@ static Result _pglCmdInU64(u64 inval, u32 cmd_id) {
} }
Result pglLaunchProgram(u64 *out_pid, const NcmProgramLocation *loc, u32 pm_launch_flags, u8 pgl_launch_flags) { Result pglLaunchProgram(u64 *out_pid, const NcmProgramLocation *loc, u32 pm_launch_flags, u8 pgl_launch_flags) {
const struct {
u8 pgl_flags;
u32 pm_flags;
NcmProgramLocation loc;
} in = { pgl_launch_flags, pm_launch_flags, *loc };
if (_pglShouldUseTipc()) { if (_pglShouldUseTipc()) {
const struct {
NcmProgramLocation loc;
u32 pm_flags;
u8 pgl_flags;
} in = { *loc, pm_launch_flags, pgl_launch_flags };
return tipcDispatchInOut(&g_pglSrv.tipc, 0, in, *out_pid); return tipcDispatchInOut(&g_pglSrv.tipc, 0, in, *out_pid);
} else { } else {
const struct {
u8 pgl_flags;
u32 pm_flags;
NcmProgramLocation loc;
} in = { pgl_launch_flags, pm_launch_flags, *loc };
return serviceDispatchInOut(&g_pglSrv.cmif, 0, in, *out_pid); return serviceDispatchInOut(&g_pglSrv.cmif, 0, in, *out_pid);
} }
} }