diff --git a/nx/include/switch/services/applet.h b/nx/include/switch/services/applet.h index a6a082cd..58ed6b3e 100644 --- a/nx/include/switch/services/applet.h +++ b/nx/include/switch/services/applet.h @@ -2284,6 +2284,7 @@ Result appletGetHomeButtonDoubleClickEnabled(bool *out); /** * @brief Open an \ref AppletApplication for the currently running Application. * @note Should not be used when no Application is running. + * @note Only available on [1.0.0-9.2.0]. * @param[out] a \ref AppletApplication */ Result appletOpenMainApplication(AppletApplication *a); diff --git a/nx/include/switch/services/ldr.h b/nx/include/switch/services/ldr.h index 859eb8e8..acc753f1 100644 --- a/nx/include/switch/services/ldr.h +++ b/nx/include/switch/services/ldr.h @@ -66,4 +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); +Result ldrPmSetEnabledProgramVerification(bool enabled); ///< [10.0.0+] diff --git a/nx/source/services/applet.c b/nx/source/services/applet.c index dbb21b01..4249343f 100644 --- a/nx/source/services/applet.c +++ b/nx/source/services/applet.c @@ -2726,7 +2726,13 @@ IPC_MAKE_CMD_IMPL_HOSVER(Result appletGetHomeButtonDoubleClickEnabled(bool *out) // IDebugFunctions -IPC_MAKE_CMD_IMPL(Result appletOpenMainApplication(AppletApplication *a), &g_appletIDebugFunctions, 1, _appletApplicationCreate, a) +Result appletOpenMainApplication(AppletApplication *a) { + if (hosversionAtLeast(10,0,0)) + return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); + + return _appletApplicationCreate(&g_appletIDebugFunctions, a, 1); +} + IPC_MAKE_CMD_IMPL(Result appletPerformSystemButtonPressing(AppletSystemButtonType type), &g_appletIDebugFunctions, 10, _appletCmdInU32NoOut, type) IPC_MAKE_CMD_IMPL(Result appletInvalidateTransitionLayer(void), &g_appletIDebugFunctions, 20, _appletCmdNoIO)