From bcc0acf9f2905d7e2cad3b6d6469e16dbfbdd161 Mon Sep 17 00:00:00 2001 From: Jos Dehaes Date: Sun, 28 Nov 2021 21:50:49 +0100 Subject: #168 - try again with TC0C smc key --- src/osx/smc.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/osx/smc.cpp') diff --git a/src/osx/smc.cpp b/src/osx/smc.cpp index 2482ae3..7386dbf 100644 --- a/src/osx/smc.cpp +++ b/src/osx/smc.cpp @@ -63,6 +63,11 @@ namespace Cpu { snprintf(key, 5, "TC%1dc", core); } result = SMCReadKey(key, &val); + if (result != kIOReturnSuccess) { + // try again with C + snprintf(key, 5, "TC%1dC", core); + result = SMCReadKey(key, &val); + } if (result == kIOReturnSuccess) { if (strcmp(val.dataType, DATATYPE_SP78) == 0) { // convert sp78 value to temperature -- cgit v1.2.3