Merge branch 'develop' of https://github.com/horizon-OC/Horizon-OC into develop

This commit is contained in:
Lightos1
2026-01-02 00:27:41 +01:00
6 changed files with 20 additions and 11 deletions

View File

@@ -37,7 +37,7 @@ include ${TOPDIR}/lib/libultrahand/ultrahand.mk
# version control constants
#---------------------------------------------------------------------------------
#TARGET_VERSION := $(shell git describe --dirty --always --tags)
APP_VERSION := 0.23
APP_VERSION := 0.22
TARGET_VERSION := $(APP_VERSION)
#---------------------------------------------------------------------------------

View File

@@ -43,7 +43,7 @@ std::string getVersionString() {
char buf[0x100] = "";
Result rc = sysclkIpcGetVersionString(buf, sizeof(buf));
if (R_FAILED(rc) || buf[0] == '\0') {
return "Unknown";
return "HorizonOC-Misc";
}
return std::string(buf);
}

View File

@@ -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;

View File

@@ -148,27 +148,28 @@ void BaseMenuGui::preDraw(tsl::gfx::Renderer* renderer) {
y+=20;
renderer->drawString(labels[10], false, positions[2], y, SMALL_TEXT_SIZE, tsl::sectionTextColor);
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(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[4], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // disp label
renderer->drawString(labels[13], false, positions[7], 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
@@ -267,12 +268,17 @@ 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]);
}

View File

@@ -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) {

View File

@@ -31,6 +31,9 @@
class MainGui : public BaseMenuGui
{
protected:
tsl::elm::ToggleListItem* enabledToggle;
public:
MainGui() {}
~MainGui() {}