fix: restore Intel Mac SMC temperature fallback

The macOS SMC per-core fallback path switched to KeyIndexes[core],
but still formatted it as an integer. That produced keys like TC48
instead of TC0C, so affected Intel Macs reported -1C for core temps.

Format the index as a character to restore the TC0C/TC1C/... fallback keys.

Assisted-by: OpenCode (GPT-5.5)
This commit is contained in:
Sean Niu
2026-04-28 19:47:22 -07:00
parent a7d525bc10
commit 0fcba375c8

View File

@@ -101,7 +101,7 @@ namespace Cpu {
long long result = getSMCTemp(key);
if (result == -1) {
// try again with C
snprintf(key, 5, "TC%1dC", KeyIndexes[core]);
snprintf(key, 5, "TC%1cC", KeyIndexes[core]);
result = getSMCTemp(key);
}
return result;