From fa7313c4950287faabb1689b06887e731074ee7f Mon Sep 17 00:00:00 2001 From: souldbminersmwc Date: Fri, 3 Apr 2026 19:29:57 -0400 Subject: [PATCH] remove real temp decimals --- Source/Horizon-OC-Monitor/source/Utils.hpp | 18 ------------------ .../source/modes/Configurator.hpp | 14 -------------- .../Horizon-OC-Monitor/source/modes/Micro.hpp | 18 +++--------------- .../Horizon-OC-Monitor/source/modes/Mini.hpp | 18 +++--------------- 4 files changed, 6 insertions(+), 62 deletions(-) diff --git a/Source/Horizon-OC-Monitor/source/Utils.hpp b/Source/Horizon-OC-Monitor/source/Utils.hpp index 70cb10f6..6cdfff09 100644 --- a/Source/Horizon-OC-Monitor/source/Utils.hpp +++ b/Source/Horizon-OC-Monitor/source/Utils.hpp @@ -1287,7 +1287,6 @@ struct MiniSettings { bool realFrequencies; bool realVolts; bool realTemps; - bool realTempsDec; bool showFullCPU; bool showFullResolution; bool showFanPercentage; @@ -1324,7 +1323,6 @@ struct MicroSettings { bool realFrequencies; bool realVolts; bool realTemps; - bool realTempsDec; bool showFullCPU; bool showFullResolution; bool showSOCVoltage; @@ -1409,7 +1407,6 @@ ALWAYS_INLINE void GetConfigSettings(MiniSettings* settings) { settings->realFrequencies = true; settings->realVolts = true; settings->realTemps = true; - settings->realTempsDec = false; settings->showFullCPU = false; settings->showFullResolution = true; settings->showFanPercentage = true; @@ -1494,13 +1491,6 @@ ALWAYS_INLINE void GetConfigSettings(MiniSettings* settings) { settings->realTemps = (key == "TRUE"); } - it = section.find("real_temps_dec"); - if (it != section.end()) { - key = it->second; - convertToUpper(key); - settings->realTempsDec = !(key == "FALSE"); - } - // Process font sizes with shared bounds static constexpr long minFontSize = 8; static constexpr long maxFontSize = 22; @@ -1717,7 +1707,6 @@ ALWAYS_INLINE void GetConfigSettings(MicroSettings* settings) { settings->realFrequencies = true; settings->realVolts = true; settings->realTemps = true; - settings->realTempsDec = false; settings->showFullCPU = false; settings->showFullResolution = false; settings->showSOCVoltage = true; @@ -1795,13 +1784,6 @@ ALWAYS_INLINE void GetConfigSettings(MicroSettings* settings) { settings->realTemps = (key == "TRUE"); } - it = section.find("real_temps_dec"); - if (it != section.end()) { - key = it->second; - convertToUpper(key); - settings->realTempsDec = !(key == "FALSE"); - } - it = section.find("show_full_cpu"); if (it != section.end()) { key = it->second; diff --git a/Source/Horizon-OC-Monitor/source/modes/Configurator.hpp b/Source/Horizon-OC-Monitor/source/modes/Configurator.hpp index f33b6a17..95894bbd 100644 --- a/Source/Horizon-OC-Monitor/source/modes/Configurator.hpp +++ b/Source/Horizon-OC-Monitor/source/modes/Configurator.hpp @@ -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"); diff --git a/Source/Horizon-OC-Monitor/source/modes/Micro.hpp b/Source/Horizon-OC-Monitor/source/modes/Micro.hpp index 9130d993..62509a8b 100644 --- a/Source/Horizon-OC-Monitor/source/modes/Micro.hpp +++ b/Source/Horizon-OC-Monitor/source/modes/Micro.hpp @@ -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(realCPU_Temp / 1000.0)); - } + snprintf(CPU_temp_c, sizeof(CPU_temp_c), "%u°C", static_cast(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(realGPU_Temp / 1000.0)); - } + snprintf(GPU_temp_c, sizeof(GPU_temp_c), "%u°C", static_cast(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(realRAM_Temp / 1000.0)); - } + snprintf(RAM_temp_c, sizeof(RAM_temp_c), "%u°C", static_cast(realRAM_Temp / 1000.0)); } } diff --git a/Source/Horizon-OC-Monitor/source/modes/Mini.hpp b/Source/Horizon-OC-Monitor/source/modes/Mini.hpp index d45f0e4c..9a49b37d 100644 --- a/Source/Horizon-OC-Monitor/source/modes/Mini.hpp +++ b/Source/Horizon-OC-Monitor/source/modes/Mini.hpp @@ -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(realCPU_Temp / 1000.0)); - } + snprintf(CPU_temp_c, sizeof(CPU_temp_c), "%u°C", static_cast(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(realGPU_Temp / 1000.0)); - } + snprintf(GPU_temp_c, sizeof(GPU_temp_c), "%u°C", static_cast(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(realRAM_Temp / 1000.0)); - } + snprintf(RAM_temp_c, sizeof(RAM_temp_c), "%u°C", static_cast(realRAM_Temp / 1000.0)); } }