diff options
author | Jos Dehaes <jos.dehaes@gmail.com> | 2021-11-28 21:50:49 +0100 |
---|---|---|
committer | Jos Dehaes <jos.dehaes@gmail.com> | 2021-12-02 21:04:57 +0100 |
commit | bcc0acf9f2905d7e2cad3b6d6469e16dbfbdd161 (patch) | |
tree | 2c39eaa04cfd3c53b8e5bdc003eb475b13673c6f | |
parent | 7d20ab3c36cefb507a6ac0a0c05bb32370e56f06 (diff) |
#168 - try again with TC0C smc key
-rw-r--r-- | src/osx/smc.cpp | 5 | ||||
-rw-r--r-- | src/osx/smc.hpp | 3 |
2 files changed, 7 insertions, 1 deletions
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 diff --git a/src/osx/smc.hpp b/src/osx/smc.hpp index 0aa02c1..6d65c9c 100644 --- a/src/osx/smc.hpp +++ b/src/osx/smc.hpp @@ -25,7 +25,8 @@ #define DATATYPE_SP78 "sp78" // key values -#define SMC_KEY_CPU_TEMP "TC0P" +#define SMC_KEY_CPU_TEMP "TC0P" // proximity temp? +#define SMC_KEY_CPU_DIE_TEMP "TC0D" // die temp? #define SMC_KEY_CPU1_TEMP "TC1C" #define SMC_KEY_CPU2_TEMP "TC2C" // etc #define SMC_KEY_FAN0_RPM_CUR "F0Ac" |