From 1d56ed1504d245489f259b4fbbb27820f0b1d741 Mon Sep 17 00:00:00 2001 From: souldbminersmwc Date: Fri, 29 May 2026 16:49:00 -0400 Subject: [PATCH] hocclk: improve ui cohesiveness --- .../hoc-clk/overlay/src/ui/gui/app_profile_gui.cpp | 2 +- Source/hoc-clk/overlay/src/ui/gui/base_menu_gui.cpp | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Source/hoc-clk/overlay/src/ui/gui/app_profile_gui.cpp b/Source/hoc-clk/overlay/src/ui/gui/app_profile_gui.cpp index 50925d83..8d1965e1 100644 --- a/Source/hoc-clk/overlay/src/ui/gui/app_profile_gui.cpp +++ b/Source/hoc-clk/overlay/src/ui/gui/app_profile_gui.cpp @@ -304,7 +304,7 @@ public: static constexpr struct { const char* label; int shift; } kAll[] = { {"CPU", 0}, {"GPU", 8}, {"VRR", 16} }; - int count = configList.values[HocClkConfigValue_OverwriteRefreshRate] || this->context->isUsingRetroSuper ? 3 : 2; + int count = configList.values[HocClkConfigValue_OverwriteRefreshRate] || this->context->isUsingRetroSuper || this->context->profile == HocClkProfile_Docked ? 3 : 2; for (int i = 0; i < count; i++) { u8 cur = (this->profileList->mhzMap[this->profile][HocClkModule_Governor] >> kAll[i].shift) & 0xFF; diff --git a/Source/hoc-clk/overlay/src/ui/gui/base_menu_gui.cpp b/Source/hoc-clk/overlay/src/ui/gui/base_menu_gui.cpp index 82835eb5..cd21fe76 100644 --- a/Source/hoc-clk/overlay/src/ui/gui/base_menu_gui.cpp +++ b/Source/hoc-clk/overlay/src/ui/gui/base_menu_gui.cpp @@ -57,11 +57,19 @@ BaseMenuGui::~BaseMenuGui() { // Fast preDraw - just renders pre-computed strings void BaseMenuGui::preDraw(tsl::gfx::Renderer* renderer) { BaseGui::preDraw(renderer); - if(!this->context) [[unlikely]] return; + if (!this->context) [[unlikely]] { + this->context = new HocClkContext; + } + + Result rc = hocclkIpcGetCurrentContext(this->context); + if (R_FAILED(rc)) [[unlikely]] { + FatalGui::openWithResultCode("hocclkIpcGetCurrentContext", rc); + return; + } // All constants pre-calculated and cached const char* labels[] = { - "App ID", "Profile", "CPU", "GPU", "MEM", "SoC", "Board", "Skin", "Now", "Avg", "BAT", "PMIC", "Fan", IsAula() ? "OLED" : "LCD", "FPS", "RES" + "App ID", "Profile", "CPU", "GPU", "MEM", "SoC", "Board", "Skin", "Now", "Avg", "BAT", "PMIC", "Fan", IsAula() || this->context->isUsingRetroSuper ? "OLED" : "LCD", "FPS", "RES" }; static constexpr u32 dataPositions[6] = {63-3+3, 200-1, 344-1-3, 200-1, 342-1, 321-1};