diff --git a/nx/include/switch/services/ldr.h b/nx/include/switch/services/ldr.h index 6f23e536..859eb8e8 100644 --- a/nx/include/switch/services/ldr.h +++ b/nx/include/switch/services/ldr.h @@ -66,3 +66,4 @@ Result ldrPmCreateProcess(u64 pin_id, u32 flags, Handle reslimit_h, Handle *out_ Result ldrPmGetProgramInfo(const NcmProgramLocation *loc, LoaderProgramInfo *out_program_info); Result ldrPmPinProgram(const NcmProgramLocation *loc, u64 *out_pin_id); Result ldrPmUnpinProgram(u64 pin_id); +Result ldrPmSetEnabledProgramVerification(bool enabled); diff --git a/nx/source/services/ldr.c b/nx/source/services/ldr.c index e0e5f911..bbfac2d9 100644 --- a/nx/source/services/ldr.c +++ b/nx/source/services/ldr.c @@ -92,3 +92,11 @@ Result ldrPmPinProgram(const NcmProgramLocation *loc, u64 *out_pin_id) { Result ldrPmUnpinProgram(u64 pin_id) { return serviceDispatchIn(&g_ldrPmSrv, 3, pin_id); } + +Result ldrPmSetEnabledProgramVerification(bool enabled) { + if(hosversionBefore(10,0,0)) + return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); + + const u8 in = enabled != 0; + return serviceDispatchIn(&g_ldrPmSrv, 4, in); +}