pm: add pmshellGetProcessId (19.0.0+)

This commit is contained in:
Michael Scire 2025-11-13 12:21:36 -07:00 committed by fincs
parent cad06c006e
commit 7a8cd13910
2 changed files with 6 additions and 0 deletions

View File

@ -138,3 +138,4 @@ Result pmshellGetApplicationProcessIdForShell(u64* pid_out);
Result pmshellBoostSystemMemoryResourceLimit(u64 boost_size);
Result pmshellBoostApplicationThreadResourceLimit(void);
Result pmshellBoostSystemThreadResourceLimit(void);
Result pmshellGetProcessId(u64* pid_out, u64 program_id);

View File

@ -199,3 +199,8 @@ Result pmshellBoostSystemThreadResourceLimit(void) {
if (!hosversionIsAtmosphere() && hosversionBefore(14,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _pmCmdVoid(&g_pmshellSrv, 10);
}
Result pmshellGetProcessId(u64* pid_out, u64 program_id) {
if (!hosversionIsAtmosphere() && hosversionBefore(19,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _pmCmdInU64OutU64(pid_out, program_id, &g_pmshellSrv, 12);
}