diff --git a/nx/include/switch/services/pcv.h b/nx/include/switch/services/pcv.h index a50532fa..172d52c5 100644 --- a/nx/include/switch/services/pcv.h +++ b/nx/include/switch/services/pcv.h @@ -20,4 +20,3 @@ Result pcvGetClockRate(PcvModule module, u32 *out_hz); Result pcvSetClockRate(PcvModule module, u32 hz); Result pcvSetVoltageEnabled(bool state, u32 voltage); Result pcvGetVoltageEnabled(bool *isEnabled, u32 voltage); - diff --git a/nx/source/services/pcv.c b/nx/source/services/pcv.c index 6c7f9860..f1768e4c 100644 --- a/nx/source/services/pcv.c +++ b/nx/source/services/pcv.c @@ -2,6 +2,7 @@ #include "result.h" #include "arm/atomics.h" #include "kernel/ipc.h" +#include "runtime/hosversion.h" #include "services/pcv.h" #include "services/sm.h" @@ -30,6 +31,10 @@ void pcvExit(void) { } Result pcvSetClockRate(PcvModule module, u32 hz) { + if(hosversionAtLeast(8,0,0)) { + return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); + } + IpcCommand c; ipcInitialize(&c); @@ -66,6 +71,10 @@ Result pcvSetClockRate(PcvModule module, u32 hz) { } Result pcvGetClockRate(PcvModule module, u32 *out_hz) { + if(hosversionAtLeast(8,0,0)) { + return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); + } + IpcCommand c; ipcInitialize(&c); @@ -105,6 +114,10 @@ Result pcvGetClockRate(PcvModule module, u32 *out_hz) { } Result pcvSetVoltageEnabled(bool state, u32 voltage) { + if(hosversionAtLeast(8,0,0)) { + return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); + } + IpcCommand c; ipcInitialize(&c); @@ -141,6 +154,10 @@ Result pcvSetVoltageEnabled(bool state, u32 voltage) { } Result pcvGetVoltageEnabled(bool *isEnabled, u32 voltage) { + if(hosversionAtLeast(8,0,0)) { + return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); + } + IpcCommand c; ipcInitialize(&c);