more debug feature

This commit is contained in:
souldbminersmwc committed 2026-08-13 20:03:53 -04:00
1 parent 539cd58464
commit 836e24c82e
12 files changed
+111 -23

No files matched your search

@@ -71,6 +71,7 @@ std::string getVersionString() {
static constexpr tsl::Color dynamicLogoRGB1 = tsl::Color(7, 15, 15, 15);
static constexpr tsl::Color dynamicLogoRGB2 = tsl::Color(2, 8, 11, 15);
static constexpr tsl::Color STATIC_TEAL = tsl::Color(7, 15, 15, 15);
const std::string name = " Horizon OC";
static s32 drawDynamicUltraText(tsl::gfx::Renderer *renderer, s32 startX, s32 y, u32 fontSize, const tsl::Color &staticColor,
@@ -131,8 +132,11 @@ void BaseGui::preDraw(tsl::gfx::Renderer *renderer) {
renderer->drawBitmap(LOGO_X, LOGO_Y_REAL - LOGO_LABEL_FONT_SIZE, LOGO_IMG_W, LOGO_IMG_H, hoc_rgba);
drawDynamicUltraText(renderer, LOGO_TEXT_X, TEXT_Y, LOGO_LABEL_FONT_SIZE, STATIC_TEAL, false);
#ifdef OVERLAY_DEBUG
static const std::string versionStr = "Version " + getVersionString() + " \"Athena (debug)\"";
#else
static const std::string versionStr = "Version " + getVersionString() + " \"Athena\"";
#endif
static constexpr tsl::Color versionColor(9, 9, 9, 15);
static constexpr s32 vx = LOGO_TEXT_X + 15;
static constexpr s32 vy = TEXT_Y + 18;
+53 -2
View File
@@ -66,7 +66,9 @@ class CpuSubmenuGui;
class GpuSubmenuGui;
class GpuCustomTableSubmenuGui;
class ExperimentalSettingsSubMenuGui;
#ifdef OVERLAY_DEBUG
class DebugSettingsSubMenuGui;
#endif
MiscGui::MiscGui() {
this->configList = new HocClkConfigValueList{};
}
@@ -735,7 +737,18 @@ void MiscGui::listUI() {
experimentalSubMenu->setValue(R_ARROW);
this->listElement->addItem(experimentalSubMenu);
}
#ifdef OVERLAY_DEBUG
tsl::elm::ListItem *debugSubMenu = new tsl::elm::ListItem("Debug Settings");
debugSubMenu->setClickListener([](u64 keys) {
if (keys & HidNpadButton_A) {
tsl::swapTo<DebugSettingsSubMenuGui>();
return true;
}
return false;
});
debugSubMenu->setValue(R_ARROW);
this->listElement->addItem(debugSubMenu);
#endif
if (!lastItemName.empty()) {
this->listElement->jumpToItem(lastItemName);
}
@@ -928,6 +941,44 @@ class ExperimentalSettingsSubMenuGui : public MiscGui {
}
};
#ifdef OVERLAY_DEBUG
class DebugSettingsSubMenuGui : public MiscGui {
public:
DebugSettingsSubMenuGui() {
}
bool handleInput(u64 keysDown, u64 keysHeld, const HidTouchState &touchPos, HidAnalogStickState leftJoyStick,
HidAnalogStickState rightJoyStick) override {
if (keysDown & KEY_B) {
triggerExitFeedback();
lastItemName = "Debug Settings";
tsl::swapTo<MiscGui>();
return true;
}
return false;
}
protected:
void listUI() override {
Result rc = hocclkIpcGetConfigValues(this->configList);
if (R_FAILED(rc)) [[unlikely]] {
FatalGui::openWithResultCode("hocclkIpcGetConfigValues", rc);
return;
}
this->listElement->addItem(new CompactCategoryHeader("Debug Settings"));
ValueThresholds thresholdsDisabled(0, 0);
std::vector<NamedValue> VerbosityList = {
NamedValue("Disabled", 0xff), NamedValue("0", 0), NamedValue("1", 1),
NamedValue("2", 2), NamedValue("3", 3),
};
addConfigButton(KipConfigValue_PcvDebugVerbosity, "PCV Log Verbosity", ValueRange(0, 0, 1, "", 0),
"Verbosity", &thresholdsDisabled, {}, VerbosityList, false, true);
}
};
#endif
class GovernorSettingsSubMenuGui : public MiscGui {
public:
GovernorSettingsSubMenuGui() {