From a1d6b3be4322efcc0b92d61e68bba6e6f3fe534e Mon Sep 17 00:00:00 2001 From: MasaGratoR Date: Fri, 8 Apr 2022 03:47:04 +0200 Subject: [PATCH] ts: Update tsGetTemperatureMilliC (#588) * ts: Update tsGetTemperatureMilliC for 14.0.0 --- nx/include/switch/services/ts.h | 2 +- nx/source/services/ts.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nx/include/switch/services/ts.h b/nx/include/switch/services/ts.h index 81ce554e..4f94b5e8 100644 --- a/nx/include/switch/services/ts.h +++ b/nx/include/switch/services/ts.h @@ -39,7 +39,7 @@ Result tsGetTemperatureRange(TsLocation location, s32 *min_temperature, s32 *max Result tsGetTemperature(TsLocation location, s32 *temperature); /** - * @brief Gets the temperature for the specified \ref TsLocation, in MilliC. + * @brief Gets the temperature for the specified \ref TsLocation, in MilliC. [1.0.0-13.2.1] * @param[in] location \ref TsLocation * @param[out] temperature Output temperature in MilliC. */ diff --git a/nx/source/services/ts.c b/nx/source/services/ts.c index 6852233b..3dfca342 100644 --- a/nx/source/services/ts.c +++ b/nx/source/services/ts.c @@ -43,6 +43,8 @@ Result tsGetTemperature(TsLocation location, s32 *temperature) { } Result tsGetTemperatureMilliC(TsLocation location, s32 *temperature) { + if (hosversionAtLeast(14,0,0)) + return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return _tsCmdInU8Out32(location, (u32*)temperature, 3); }