remove real temp decimals
This commit is contained in:
@@ -411,12 +411,6 @@ public:
|
||||
});
|
||||
list->addItem(realTemps);
|
||||
|
||||
auto *realTempsDec = new tsl::elm::ToggleListItem("Real Temp Decimals", getCurrentRealTempsDec());
|
||||
realTempsDec->setStateChangedListener([this, section](bool state) {
|
||||
ult::setIniFileValue(configIniPath, section, "real_temps_dec", state ? "true" : "false");
|
||||
});
|
||||
list->addItem(realTempsDec);
|
||||
|
||||
auto* showFullCPU = new tsl::elm::ToggleListItem("Full CPU", getCurrentShowFullCPU());
|
||||
showFullCPU->setStateChangedListener([this, section](bool state) {
|
||||
ult::setIniFileValue(configIniPath, section, "show_full_cpu", state ? "true" : "false");
|
||||
@@ -573,14 +567,6 @@ private:
|
||||
return value == "TRUE";
|
||||
}
|
||||
|
||||
bool getCurrentRealTempsDec() {
|
||||
const std::string section = isMiniMode ? "mini" : "micro";
|
||||
std::string value = ult::parseValueFromIniSection(configIniPath, section, "real_temps_dec");
|
||||
if (value.empty()) return true;
|
||||
convertToUpper(value);
|
||||
return value == "TRUE";
|
||||
}
|
||||
|
||||
bool getCurrentShowFullCPU() {
|
||||
const std::string section = isMiniMode ? "mini" : "micro";
|
||||
std::string value = ult::parseValueFromIniSection(configIniPath, section, "show_full_cpu");
|
||||
|
||||
@@ -1104,25 +1104,13 @@ public:
|
||||
|
||||
if (settings.realTemps) {
|
||||
if (realCPU_Temp != 0) {
|
||||
if (settings.realTempsDec) {
|
||||
snprintf(CPU_temp_c, sizeof(CPU_temp_c), "%.1f°C", realCPU_Temp / 1000.0f);
|
||||
} else {
|
||||
snprintf(CPU_temp_c, sizeof(CPU_temp_c), "%u°C", static_cast<u32>(realCPU_Temp / 1000.0));
|
||||
}
|
||||
snprintf(CPU_temp_c, sizeof(CPU_temp_c), "%u°C", static_cast<u32>(realCPU_Temp / 1000.0));
|
||||
}
|
||||
if (realGPU_Temp != 0) {
|
||||
if (settings.realTempsDec) {
|
||||
snprintf(GPU_temp_c, sizeof(GPU_temp_c), "%.1f°C", realGPU_Temp / 1000.0f);
|
||||
} else {
|
||||
snprintf(GPU_temp_c, sizeof(GPU_temp_c), "%u°C", static_cast<u32>(realGPU_Temp / 1000.0));
|
||||
}
|
||||
snprintf(GPU_temp_c, sizeof(GPU_temp_c), "%u°C", static_cast<u32>(realGPU_Temp / 1000.0));
|
||||
}
|
||||
if (realRAM_Temp != 0) {
|
||||
if (settings.realTempsDec) {
|
||||
snprintf(RAM_temp_c, sizeof(RAM_temp_c), "%.1f°C", realRAM_Temp / 1000.0f);
|
||||
} else {
|
||||
snprintf(RAM_temp_c, sizeof(RAM_temp_c), "%u°C", static_cast<u32>(realRAM_Temp / 1000.0));
|
||||
}
|
||||
snprintf(RAM_temp_c, sizeof(RAM_temp_c), "%u°C", static_cast<u32>(realRAM_Temp / 1000.0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1290,25 +1290,13 @@ public:
|
||||
|
||||
if (settings.realTemps) {
|
||||
if (realCPU_Temp != 0) {
|
||||
if (settings.realTempsDec) {
|
||||
snprintf(CPU_temp_c, sizeof(CPU_temp_c), "%.1f°C", realCPU_Temp / 1000.0f);
|
||||
} else {
|
||||
snprintf(CPU_temp_c, sizeof(CPU_temp_c), "%u°C", static_cast<u32>(realCPU_Temp / 1000.0));
|
||||
}
|
||||
snprintf(CPU_temp_c, sizeof(CPU_temp_c), "%u°C", static_cast<u32>(realCPU_Temp / 1000.0));
|
||||
}
|
||||
if (realGPU_Temp != 0) {
|
||||
if (settings.realTempsDec) {
|
||||
snprintf(GPU_temp_c, sizeof(GPU_temp_c), "%.1f°C", realGPU_Temp / 1000.0f);
|
||||
} else {
|
||||
snprintf(GPU_temp_c, sizeof(GPU_temp_c), "%u°C", static_cast<u32>(realGPU_Temp / 1000.0));
|
||||
}
|
||||
snprintf(GPU_temp_c, sizeof(GPU_temp_c), "%u°C", static_cast<u32>(realGPU_Temp / 1000.0));
|
||||
}
|
||||
if (realRAM_Temp != 0) {
|
||||
if (settings.realTempsDec) {
|
||||
snprintf(RAM_temp_c, sizeof(RAM_temp_c), "%.1f°C", realRAM_Temp / 1000.0f);
|
||||
} else {
|
||||
snprintf(RAM_temp_c, sizeof(RAM_temp_c), "%u°C", static_cast<u32>(realRAM_Temp / 1000.0));
|
||||
}
|
||||
snprintf(RAM_temp_c, sizeof(RAM_temp_c), "%u°C", static_cast<u32>(realRAM_Temp / 1000.0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user