ts: Update tsGetTemperatureMilliC (#588)

* ts: Update tsGetTemperatureMilliC for 14.0.0
This commit is contained in:
MasaGratoR 2022-04-08 03:47:04 +02:00 committed by GitHub
parent d42ddeff78
commit a1d6b3be43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -39,7 +39,7 @@ Result tsGetTemperatureRange(TsLocation location, s32 *min_temperature, s32 *max
Result tsGetTemperature(TsLocation location, s32 *temperature); 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[in] location \ref TsLocation
* @param[out] temperature Output temperature in MilliC. * @param[out] temperature Output temperature in MilliC.
*/ */

View File

@ -43,6 +43,8 @@ Result tsGetTemperature(TsLocation location, s32 *temperature) {
} }
Result tsGetTemperatureMilliC(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); return _tsCmdInU8Out32(location, (u32*)temperature, 3);
} }