Fix cpu fallback temp sensor logic

Break the for loop either way so `path` still points to sensor module's hwmon folder.
pull/247/head
jackun 4 years ago
parent 62efa4acc4
commit 068157f3d8
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -291,12 +291,15 @@ bool CPUStats::GetCpuFile() {
#ifndef NDEBUG
std::cerr << "hwmon: sensor name: " << name << std::endl;
#endif
if (name == "coretemp" && find_temp_input(path, input, "Package id 0")) {
if (name == "coretemp") {
find_temp_input(path, input, "Package id 0");
break;
}
else if ((name == "zenpower" || name == "k10temp") && find_temp_input(path, input, "Tdie")) {
else if ((name == "zenpower" || name == "k10temp")) {
find_temp_input(path, input, "Tdie");
break;
} else if (name == "atk0110" && find_temp_input(path, input, "CPU Temperature")){
} else if (name == "atk0110") {
find_temp_input(path, input, "CPU Temperature");
break;
}
}

Loading…
Cancel
Save