diff --git a/common/thermalstatus.h b/common/thermalstatus.h new file mode 100644 index 0000000..12c1183 --- /dev/null +++ b/common/thermalstatus.h @@ -0,0 +1,7 @@ +#pragma once +#include "common.h" + +bool thermalstatusInit(void); +void thermalstatusExit(void); +bool thermalstatusGetDetails(s32 *temperature); + diff --git a/nx_main/nx_thermalstatus.c b/nx_main/nx_thermalstatus.c new file mode 100644 index 0000000..3b35baf --- /dev/null +++ b/nx_main/nx_thermalstatus.c @@ -0,0 +1,14 @@ +#include "../common/common.h" + +bool thermalstatusInit(void) { + return R_SUCCEEDED(tsInitialize()); +} + +void thermalstatusExit(void) { + tsExit(); +} + +bool thermalstatusGetDetails(s32 *temperature) { + return R_SUCCEEDED(tsGetTemperatureMilliC(TsLocation_Internal, temperature)); +} + diff --git a/pc_main/pc_thermalstatus.c b/pc_main/pc_thermalstatus.c new file mode 100644 index 0000000..1ecac2f --- /dev/null +++ b/pc_main/pc_thermalstatus.c @@ -0,0 +1,15 @@ +#include "../common/common.h" + +bool thermalstatusInit(void) { + return false; +} + +void thermalstatusExit(void) { + +} + +bool thermalstatusGetDetails(s32 *temperature) { + *temperature = 0; + return false; +} +