diff --git a/nx/include/switch/services/ectx.h b/nx/include/switch/services/ectx.h index f402f95a..ba5e697b 100644 --- a/nx/include/switch/services/ectx.h +++ b/nx/include/switch/services/ectx.h @@ -9,7 +9,7 @@ #include "../kernel/event.h" #include "../sf/service.h" -/// Initialize ectx:r. +/// [11.0.0+] Initialize ectx:r. Result ectxrInitialize(void); /// Exit ectx:r. @@ -19,7 +19,7 @@ void ectxrExit(void); Service* ectxrGetServiceSession(void); /** - * @brief Retrieves the error context associated with an error descriptor and result. + * @brief [11.0.0+] Retrieves the error context associated with an error descriptor and result. * @return Result code. */ Result ectxrPullContext(s32 *out0, u32 *out_total_size, u32 *out_size, void *dst, size_t dst_size, u32 descriptor, Result result); diff --git a/nx/source/services/ectx.c b/nx/source/services/ectx.c index 66b2ebd1..4f148b57 100644 --- a/nx/source/services/ectx.c +++ b/nx/source/services/ectx.c @@ -1,5 +1,6 @@ #define NX_SERVICE_ASSUME_NON_DOMAIN #include "service_guard.h" +#include "runtime/hosversion.h" #include "services/ectx.h" static Service g_ectxrSrv; @@ -7,6 +8,8 @@ static Service g_ectxrSrv; NX_GENERATE_SERVICE_GUARD(ectxr); Result _ectxrInitialize(void) { + if (hosversionBefore(11,0,0)) + return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return smGetService(&g_ectxrSrv, "ectx:r"); }