From d9834842bfc60507e6153aee29450c07fb52088b Mon Sep 17 00:00:00 2001 From: Lightos1 <124387232+Lightos1@users.noreply.github.com> Date: Fri, 2 Jan 2026 00:29:27 +0100 Subject: [PATCH] I am incompetent --- Source/sys-clk/overlay/Makefile | 2 +- .../sys-clk/overlay/src/ui/gui/base_gui.cpp | 2 +- Source/sys-clk/overlay/src/ui/gui/base_gui.h | 2 +- .../overlay/src/ui/gui/base_menu_gui.cpp | 20 +++++++------------ .../sys-clk/overlay/src/ui/gui/main_gui.cpp | 2 +- Source/sys-clk/overlay/src/ui/gui/main_gui.h | 3 --- 6 files changed, 11 insertions(+), 20 deletions(-) diff --git a/Source/sys-clk/overlay/Makefile b/Source/sys-clk/overlay/Makefile index 008c4b87..d5540225 100644 --- a/Source/sys-clk/overlay/Makefile +++ b/Source/sys-clk/overlay/Makefile @@ -37,7 +37,7 @@ include ${TOPDIR}/lib/libultrahand/ultrahand.mk # version control constants #--------------------------------------------------------------------------------- #TARGET_VERSION := $(shell git describe --dirty --always --tags) -APP_VERSION := 0.22 +APP_VERSION := 0.23 TARGET_VERSION := $(APP_VERSION) #--------------------------------------------------------------------------------- diff --git a/Source/sys-clk/overlay/src/ui/gui/base_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/base_gui.cpp index 086063d5..f921a2e5 100644 --- a/Source/sys-clk/overlay/src/ui/gui/base_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/base_gui.cpp @@ -43,7 +43,7 @@ std::string getVersionString() { char buf[0x100] = ""; Result rc = sysclkIpcGetVersionString(buf, sizeof(buf)); if (R_FAILED(rc) || buf[0] == '\0') { - return "HorizonOC-Misc"; + return "Unknown"; } return std::string(buf); } diff --git a/Source/sys-clk/overlay/src/ui/gui/base_gui.h b/Source/sys-clk/overlay/src/ui/gui/base_gui.h index eac03aee..eb0621b1 100644 --- a/Source/sys-clk/overlay/src/ui/gui/base_gui.h +++ b/Source/sys-clk/overlay/src/ui/gui/base_gui.h @@ -41,7 +41,7 @@ class BaseGui : public tsl::Gui public: BaseGui() {} ~BaseGui() {} - virtual void preDraw(tsl::gfx::Renderer* renderer); + virtual void preDraw(tsl::gfx::Renderer* renderer); void update() override; tsl::elm::Element* createUI() override; virtual tsl::elm::Element* baseUI() = 0; diff --git a/Source/sys-clk/overlay/src/ui/gui/base_menu_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/base_menu_gui.cpp index 16df6dd7..e62bfbf4 100644 --- a/Source/sys-clk/overlay/src/ui/gui/base_menu_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/base_menu_gui.cpp @@ -148,28 +148,27 @@ void BaseMenuGui::preDraw(tsl::gfx::Renderer* renderer) { y+=20; - renderer->drawString(labels[10], false, positions[5], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); - renderer->drawString(labels[11], false, positions[6], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); + renderer->drawString(labels[10], false, positions[2], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); renderer->drawString(displayStrings[20], false, dataPositions[0], y, SMALL_TEXT_SIZE, tempColors[HorizonOCThermalSensor_Battery]); // Battery - renderer->drawString(displayStrings[22], false, dataPositions[1], y, SMALL_TEXT_SIZE, tempColors[HorizonOCThermalSensor_PMIC]); // PMIC - renderer->drawString(labels[13], false, positions[7], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // disp label + renderer->drawString(labels[13], false, positions[4], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // disp label renderer->drawString(displayStrings[25], false, dataPositions[2], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // disp freq + renderer->drawString(labels[12], false, positions[3], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // fan label + + renderer->drawString(displayStrings[24], false, dataPositions[1], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // fan speed + y+=20; renderer->drawString(displayStrings[21], false, dataPositions[0], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // Bat voltage renderer->drawString(displayStrings[23], false, positions[2] - 2, y, SMALL_TEXT_SIZE, tsl::infoTextColor); // Bat Age - renderer->drawString(labels[12], false, positions[6], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // fan label - - renderer->drawString(displayStrings[24], false, dataPositions[1], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // fan speed renderer->drawString(displayStrings[26], false, dataPositions[2], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // disp volt - + y+=20; } // Optimized refresh - now does all the string formatting once per second @@ -268,17 +267,12 @@ void BaseMenuGui::refresh() sprintf(displayStrings[21], "%d mV", context->voltages[HocClkVoltage_Battery]); // BAT AVG - millis = context->temps[HorizonOCThermalSensor_PMIC]; // Battery - sprintf(displayStrings[22], "%u.%u °C", millis / 1000U, (millis % 1000U) / 100U); - tempColors[HorizonOCThermalSensor_PMIC] = tsl::GradientColor(millis * 0.001f); - sprintf(displayStrings[23], "%u%%", context->PartLoad[HocClkPartLoad_BAT] / 1000); sprintf(displayStrings[24], "%u%%", context->PartLoad[HocClkPartLoad_FAN]); sprintf(displayStrings[25], "%u Hz", context->realFreqs[HorizonOCModule_Display]); - sprintf(displayStrings[26], "%u.%u mV", context->voltages[HocClkVoltage_Display] / 1000U, context->voltages[HocClkVoltage_Display] % 1000U); //sprintf(displayStrings[26], "%u", context->speedos[HorizonOCSpeedo_CPU]); } diff --git a/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp index 2df62d9a..aa8bb42f 100644 --- a/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/main_gui.cpp @@ -45,7 +45,7 @@ void MainGui::listUI() // this->lastContextUpdate = armGetSystemTick(); // this->context->enabled = state; // }); -// this->listElement->addItem(this->enabledToggle); + // this->listElement->addItem(this->enabledToggle); tsl::elm::ListItem* appProfileItem = new tsl::elm::ListItem("Edit App Profile"); appProfileItem->setClickListener([this](u64 keys) { diff --git a/Source/sys-clk/overlay/src/ui/gui/main_gui.h b/Source/sys-clk/overlay/src/ui/gui/main_gui.h index 77b98a2e..bf100679 100644 --- a/Source/sys-clk/overlay/src/ui/gui/main_gui.h +++ b/Source/sys-clk/overlay/src/ui/gui/main_gui.h @@ -31,9 +31,6 @@ class MainGui : public BaseMenuGui { - protected: - tsl::elm::ToggleListItem* enabledToggle; - public: MainGui() {} ~MainGui() {}