sysclk: rename to hocclk
idc about compatability when the programs are structured very differently, work very differently, and send/get data in very different ways
This commit is contained in:
@@ -302,9 +302,9 @@ void AboutGui::refresh()
|
||||
if (!this->context)
|
||||
return;
|
||||
// Format strings once per refresh
|
||||
sprintf(strings[0], "%u/%u/%u", this->context->speedos[HorizonOCSpeedo_CPU], this->context->speedos[HorizonOCSpeedo_GPU], this->context->speedos[HorizonOCSpeedo_SOC]);
|
||||
sprintf(strings[0], "%u/%u/%u", this->context->speedos[HocClkSpeedo_CPU], this->context->speedos[HocClkSpeedo_GPU], this->context->speedos[HocClkSpeedo_SOC]);
|
||||
// This is how hekate does it
|
||||
sprintf(strings[1], "%u/%u/%u", this->context->iddq[HorizonOCSpeedo_CPU], this->context->iddq[HorizonOCSpeedo_GPU], this->context->iddq[HorizonOCSpeedo_SOC]);
|
||||
sprintf(strings[1], "%u/%u/%u", this->context->iddq[HocClkSpeedo_CPU], this->context->iddq[HocClkSpeedo_GPU], this->context->iddq[HocClkSpeedo_SOC]);
|
||||
SpeedoItem->setValue(strings[0]);
|
||||
IddqItem->setValue(strings[1]);
|
||||
DramModule->setValue(formatRamModule());
|
||||
@@ -320,7 +320,7 @@ void AboutGui::refresh()
|
||||
waferCordsItem->setValue(strings[2]);
|
||||
|
||||
if(IsErista()) {
|
||||
u32 millis = context->temps[HorizonOCThermalSensor_PLLX];
|
||||
u32 millis = context->temps[HocClkThermalSensor_PLLX];
|
||||
sprintf(strings[3], "%u.%u", millis / 1000U, (millis % 1000U) / 100U);
|
||||
eristaPLLXItem->setValue(strings[3]);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "../format.h"
|
||||
#include "fatal_gui.h"
|
||||
#include "labels.h"
|
||||
AppProfileGui::AppProfileGui(std::uint64_t applicationId, SysClkTitleProfileList* profileList)
|
||||
AppProfileGui::AppProfileGui(std::uint64_t applicationId, HocClkTitleProfileList* profileList)
|
||||
{
|
||||
this->applicationId = applicationId;
|
||||
this->profileList = profileList;
|
||||
@@ -41,31 +41,31 @@ AppProfileGui::~AppProfileGui()
|
||||
delete this->profileList;
|
||||
}
|
||||
|
||||
void AppProfileGui::openFreqChoiceGui(tsl::elm::ListItem* listItem, SysClkProfile profile, SysClkModule module)
|
||||
void AppProfileGui::openFreqChoiceGui(tsl::elm::ListItem* listItem, HocClkProfile profile, HocClkModule module)
|
||||
{
|
||||
std::uint32_t hzList[SYSCLK_FREQ_LIST_MAX];
|
||||
std::uint32_t hzList[HOCCLK_FREQ_LIST_MAX];
|
||||
std::uint32_t hzCount;
|
||||
Result rc = sysclkIpcGetFreqList(module, &hzList[0], SYSCLK_FREQ_LIST_MAX, &hzCount);
|
||||
Result rc = hocclkIpcGetFreqList(module, &hzList[0], HOCCLK_FREQ_LIST_MAX, &hzCount);
|
||||
if(R_FAILED(rc))
|
||||
{
|
||||
FatalGui::openWithResultCode("sysclkIpcGetFreqList", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetFreqList", rc);
|
||||
return;
|
||||
}
|
||||
std::map<uint32_t, std::string> labels = {};
|
||||
|
||||
if (module == SysClkModule_CPU) {
|
||||
if (module == HocClkModule_CPU) {
|
||||
bool isUsingUv = IsMariko() ? configList.values[KipConfigValue_marikoCpuUVHigh] : configList.values[KipConfigValue_eristaCpuUV];
|
||||
labels = IsMariko() ? (isUsingUv ? cpu_freq_label_m_uv : cpu_freq_label_m) : (isUsingUv ? cpu_freq_label_e_uv : cpu_freq_label_e);
|
||||
} else if (module == SysClkModule_GPU) {
|
||||
} else if (module == HocClkModule_GPU) {
|
||||
labels = IsMariko() ? *(marikoUV[configList.values[KipConfigValue_marikoGpuUV]]) : *(eristaUV[configList.values[KipConfigValue_eristaGpuUV]]);
|
||||
}
|
||||
tsl::changeTo<FreqChoiceGui>(this->profileList->mhzMap[profile][module] * 1000000, hzList, hzCount, module, [this, listItem, profile, module](std::uint32_t hz) {
|
||||
this->profileList->mhzMap[profile][module] = hz / 1000000;
|
||||
listItem->setValue(formatListFreqMHz(this->profileList->mhzMap[profile][module]));
|
||||
Result rc = sysclkIpcSetProfiles(this->applicationId, this->profileList);
|
||||
Result rc = hocclkIpcSetProfiles(this->applicationId, this->profileList);
|
||||
if(R_FAILED(rc))
|
||||
{
|
||||
FatalGui::openWithResultCode("sysclkIpcSetProfiles", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetProfiles", rc);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -101,9 +101,9 @@ void AppProfileGui::openValueChoiceGui(
|
||||
);
|
||||
}
|
||||
|
||||
void AppProfileGui::addModuleListItem(SysClkProfile profile, SysClkModule module)
|
||||
void AppProfileGui::addModuleListItem(HocClkProfile profile, HocClkModule module)
|
||||
{
|
||||
tsl::elm::ListItem* listItem = new tsl::elm::ListItem(sysclkFormatModule(module, true));
|
||||
tsl::elm::ListItem* listItem = new tsl::elm::ListItem(hocclkFormatModule(module, true));
|
||||
listItem->setValue(formatListFreqMHz(this->profileList->mhzMap[profile][module]));
|
||||
listItem->setClickListener([this, listItem, profile, module](u64 keys) {
|
||||
if((keys & HidNpadButton_A) == HidNpadButton_A)
|
||||
@@ -117,10 +117,10 @@ void AppProfileGui::addModuleListItem(SysClkProfile profile, SysClkModule module
|
||||
this->profileList->mhzMap[profile][module] = 0;
|
||||
listItem->setValue(formatListFreqMHz(0));
|
||||
|
||||
Result rc = sysclkIpcSetProfiles(this->applicationId, this->profileList);
|
||||
Result rc = hocclkIpcSetProfiles(this->applicationId, this->profileList);
|
||||
if(R_FAILED(rc))
|
||||
{
|
||||
FatalGui::openWithResultCode("sysclkIpcSetProfiles", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetProfiles", rc);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -130,9 +130,9 @@ void AppProfileGui::addModuleListItem(SysClkProfile profile, SysClkModule module
|
||||
this->listElement->addItem(listItem);
|
||||
}
|
||||
|
||||
void AppProfileGui::addModuleListItemToggle(SysClkProfile profile, SysClkModule module)
|
||||
void AppProfileGui::addModuleListItemToggle(HocClkProfile profile, HocClkModule module)
|
||||
{
|
||||
const char* moduleName = sysclkFormatModule(module, true);
|
||||
const char* moduleName = hocclkFormatModule(module, true);
|
||||
std::uint32_t currentValue = this->profileList->mhzMap[profile][module];
|
||||
|
||||
tsl::elm::ToggleListItem* toggle = new tsl::elm::ToggleListItem(moduleName, currentValue != 0);
|
||||
@@ -140,10 +140,10 @@ void AppProfileGui::addModuleListItemToggle(SysClkProfile profile, SysClkModule
|
||||
toggle->setStateChangedListener([this, profile, module](bool state) {
|
||||
this->profileList->mhzMap[profile][module] = state ? 1 : 0;
|
||||
|
||||
Result rc = sysclkIpcSetProfiles(this->applicationId, this->profileList);
|
||||
Result rc = hocclkIpcSetProfiles(this->applicationId, this->profileList);
|
||||
if(R_FAILED(rc))
|
||||
{
|
||||
FatalGui::openWithResultCode("sysclkIpcSetProfiles", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetProfiles", rc);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -181,8 +181,8 @@ std::string AppProfileGui::formatValueDisplay(
|
||||
}
|
||||
|
||||
void AppProfileGui::addModuleListItemValue(
|
||||
SysClkProfile profile,
|
||||
SysClkModule module,
|
||||
HocClkProfile profile,
|
||||
HocClkModule module,
|
||||
const std::string& categoryName,
|
||||
std::uint32_t min,
|
||||
std::uint32_t max,
|
||||
@@ -196,7 +196,7 @@ void AppProfileGui::addModuleListItemValue(
|
||||
)
|
||||
{
|
||||
tsl::elm::ListItem* listItem =
|
||||
new tsl::elm::ListItem(sysclkFormatModule(module, true));
|
||||
new tsl::elm::ListItem(hocclkFormatModule(module, true));
|
||||
std::uint32_t storedValue = this->profileList->mhzMap[profile][module];
|
||||
|
||||
listItem->setValue(this->formatValueDisplay(storedValue, namedValues, suffix, divisor, decimalPlaces));
|
||||
@@ -240,12 +240,12 @@ void AppProfileGui::addModuleListItemValue(
|
||||
listItem->setValue(this->formatValueDisplay(value / divisor, namedValues, suffix, divisor, decimalPlaces));
|
||||
|
||||
Result rc =
|
||||
sysclkIpcSetProfiles(this->applicationId,
|
||||
hocclkIpcSetProfiles(this->applicationId,
|
||||
this->profileList);
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
FatalGui::openWithResultCode(
|
||||
"sysclkIpcSetProfiles", rc);
|
||||
"hocclkIpcSetProfiles", rc);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -263,11 +263,11 @@ void AppProfileGui::addModuleListItemValue(
|
||||
this->profileList->mhzMap[profile][module] = 0;
|
||||
listItem->setValue(FREQ_DEFAULT_TEXT);
|
||||
Result rc =
|
||||
sysclkIpcSetProfiles(this->applicationId,
|
||||
hocclkIpcSetProfiles(this->applicationId,
|
||||
this->profileList);
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
FatalGui::openWithResultCode("sysclkIpcSetProfiles", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetProfiles", rc);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -279,16 +279,16 @@ void AppProfileGui::addModuleListItemValue(
|
||||
|
||||
class GovernorProfileSubMenuGui : public BaseMenuGui {
|
||||
uint64_t applicationId;
|
||||
SysClkTitleProfileList* profileList;
|
||||
SysClkProfile profile;
|
||||
HocClkTitleProfileList* profileList;
|
||||
HocClkProfile profile;
|
||||
public:
|
||||
GovernorProfileSubMenuGui(uint64_t appId, SysClkTitleProfileList* pList, SysClkProfile prof)
|
||||
GovernorProfileSubMenuGui(uint64_t appId, HocClkTitleProfileList* pList, HocClkProfile prof)
|
||||
: applicationId(appId), profileList(pList), profile(prof) {}
|
||||
|
||||
void listUI() override {
|
||||
Result rc = sysclkIpcGetConfigValues(&configList);
|
||||
Result rc = hocclkIpcGetConfigValues(&configList);
|
||||
if (R_FAILED(rc)) [[unlikely]] {
|
||||
FatalGui::openWithResultCode("sysclkIpcGetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetConfigValues", rc);
|
||||
return;
|
||||
}
|
||||
this->listElement->addItem(new tsl::elm::CategoryHeader("Governor"));
|
||||
@@ -296,10 +296,10 @@ public:
|
||||
static constexpr struct { const char* label; int shift; } kAll[] = {
|
||||
{"CPU", 0}, {"GPU", 8}, {"VRR", 16}
|
||||
};
|
||||
int count = configList.values[HorizonOCConfigValue_OverwriteRefreshRate] ? 3 : 2;
|
||||
int count = configList.values[HocClkConfigValue_OverwriteRefreshRate] ? 3 : 2;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
u8 cur = (this->profileList->mhzMap[this->profile][HorizonOCModule_Governor] >> kAll[i].shift) & 0xFF;
|
||||
u8 cur = (this->profileList->mhzMap[this->profile][HocClkModule_Governor] >> kAll[i].shift) & 0xFF;
|
||||
auto* bar = new tsl::elm::NamedStepTrackBar(
|
||||
"", {"Do Not Override", "Disabled", "Enabled"},
|
||||
true, kAll[i].label
|
||||
@@ -307,17 +307,17 @@ public:
|
||||
bar->setProgress(cur);
|
||||
int shift = kAll[i].shift;
|
||||
bar->setValueChangedListener([this, shift](u8 value) {
|
||||
u32& packed = this->profileList->mhzMap[this->profile][HorizonOCModule_Governor];
|
||||
u32& packed = this->profileList->mhzMap[this->profile][HocClkModule_Governor];
|
||||
packed = (packed & ~(0xFFu << shift)) | ((u32)value << shift);
|
||||
Result rc = sysclkIpcSetProfiles(this->applicationId, this->profileList);
|
||||
if (R_FAILED(rc)) FatalGui::openWithResultCode("sysclkIpcSetProfiles", rc);
|
||||
Result rc = hocclkIpcSetProfiles(this->applicationId, this->profileList);
|
||||
if (R_FAILED(rc)) FatalGui::openWithResultCode("hocclkIpcSetProfiles", rc);
|
||||
});
|
||||
this->listElement->addItem(bar);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void AppProfileGui::addGovernorSection(SysClkProfile profile) {
|
||||
void AppProfileGui::addGovernorSection(HocClkProfile profile) {
|
||||
auto* item = new tsl::elm::ListItem("Governor");
|
||||
item->setValue("\u2192"); // Right arrow
|
||||
item->setClickListener([this, profile](u64 keys) {
|
||||
@@ -332,29 +332,29 @@ void AppProfileGui::addGovernorSection(SysClkProfile profile) {
|
||||
this->listElement->addItem(item);
|
||||
}
|
||||
|
||||
void AppProfileGui::addProfileUI(SysClkProfile profile)
|
||||
void AppProfileGui::addProfileUI(HocClkProfile profile)
|
||||
{
|
||||
BaseMenuGui::refresh();
|
||||
if(!this->context)
|
||||
return;
|
||||
Result rc = sysclkIpcGetConfigValues(&configList);
|
||||
Result rc = hocclkIpcGetConfigValues(&configList);
|
||||
if (R_FAILED(rc)) [[unlikely]] {
|
||||
FatalGui::openWithResultCode("sysclkIpcGetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetConfigValues", rc);
|
||||
return;
|
||||
}
|
||||
if((profile == SysClkProfile_Docked && IsHoag()) || profile == SysClkProfile_HandheldCharging)
|
||||
if((profile == HocClkProfile_Docked && IsHoag()) || profile == HocClkProfile_HandheldCharging)
|
||||
return;
|
||||
this->listElement->addItem(new tsl::elm::CategoryHeader(sysclkFormatProfile(profile, true) + std::string(" ") + ult::DIVIDER_SYMBOL + " \ue0e3 Reset"));
|
||||
this->addModuleListItem(profile, SysClkModule_CPU);
|
||||
this->addModuleListItem(profile, SysClkModule_GPU);
|
||||
this->addModuleListItem(profile, SysClkModule_MEM);
|
||||
this->listElement->addItem(new tsl::elm::CategoryHeader(hocclkFormatProfile(profile, true) + std::string(" ") + ult::DIVIDER_SYMBOL + " \ue0e3 Reset"));
|
||||
this->addModuleListItem(profile, HocClkModule_CPU);
|
||||
this->addModuleListItem(profile, HocClkModule_GPU);
|
||||
this->addModuleListItem(profile, HocClkModule_MEM);
|
||||
#if IS_MINIMAL == 0
|
||||
ValueThresholds lcdThresholds(60, 65);
|
||||
ValueThresholds DThresholdsOLED(120, 500); // nothing is dangerous, past 120hz you can get applet crashes
|
||||
|
||||
if(configList.values[HorizonOCConfigValue_OverwriteRefreshRate]) {
|
||||
if(profile != SysClkProfile_Docked) {
|
||||
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", IsAula() ? 45 : 40, configList.values[HorizonOCConfigValue_MaxDisplayClockH], this->context->isUsingRetroSuper ? 5 : 1, " Hz", 1, 0, lcdThresholds);
|
||||
if(configList.values[HocClkConfigValue_OverwriteRefreshRate]) {
|
||||
if(profile != HocClkProfile_Docked) {
|
||||
this->addModuleListItemValue(profile, HocClkModule_Display, "Display", IsAula() ? 45 : 40, configList.values[HocClkConfigValue_MaxDisplayClockH], this->context->isUsingRetroSuper ? 5 : 1, " Hz", 1, 0, lcdThresholds);
|
||||
} else {
|
||||
if(IsAula() && this->context->isSysDockInstalled) {
|
||||
std::vector<NamedValue> dockedFreqs = {
|
||||
@@ -388,7 +388,7 @@ void AppProfileGui::addProfileUI(SysClkProfile profile)
|
||||
NamedValue("240 Hz", 240)
|
||||
};
|
||||
|
||||
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 40, 240, 1, " Hz", 1, 0, DThresholdsOLED, dockedFreqs);
|
||||
this->addModuleListItemValue(profile, HocClkModule_Display, "Display", 40, 240, 1, " Hz", 1, 0, DThresholdsOLED, dockedFreqs);
|
||||
} else if (IsAula() && !this->context->isSysDockInstalled) {
|
||||
std::vector<NamedValue> dockedFreqsLimited = {
|
||||
NamedValue("50 Hz", 50),
|
||||
@@ -400,7 +400,7 @@ void AppProfileGui::addProfileUI(SysClkProfile profile)
|
||||
NamedValue("75 Hz", 75)
|
||||
};
|
||||
|
||||
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 50, 75, 1, " Hz", 1, 0, DThresholdsOLED, dockedFreqsLimited);
|
||||
this->addModuleListItemValue(profile, HocClkModule_Display, "Display", 50, 75, 1, " Hz", 1, 0, DThresholdsOLED, dockedFreqsLimited);
|
||||
} else {
|
||||
std::vector<NamedValue> dockedFreqsStandard = {
|
||||
NamedValue("50 Hz", 50),
|
||||
@@ -420,7 +420,7 @@ void AppProfileGui::addProfileUI(SysClkProfile profile)
|
||||
NamedValue("115 Hz", 115),
|
||||
NamedValue("120 Hz", 120)
|
||||
};
|
||||
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 50, 120, 1, " Hz", 1, 0, ValueThresholds(), dockedFreqsStandard);
|
||||
this->addModuleListItemValue(profile, HocClkModule_Display, "Display", 50, 120, 1, " Hz", 1, 0, ValueThresholds(), dockedFreqsStandard);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -430,21 +430,21 @@ void AppProfileGui::addProfileUI(SysClkProfile profile)
|
||||
|
||||
void AppProfileGui::listUI()
|
||||
{
|
||||
this->addProfileUI(SysClkProfile_Docked);
|
||||
this->addProfileUI(SysClkProfile_Handheld);
|
||||
this->addProfileUI(SysClkProfile_HandheldCharging);
|
||||
this->addProfileUI(SysClkProfile_HandheldChargingOfficial);
|
||||
this->addProfileUI(SysClkProfile_HandheldChargingUSB);
|
||||
this->addProfileUI(HocClkProfile_Docked);
|
||||
this->addProfileUI(HocClkProfile_Handheld);
|
||||
this->addProfileUI(HocClkProfile_HandheldCharging);
|
||||
this->addProfileUI(HocClkProfile_HandheldChargingOfficial);
|
||||
this->addProfileUI(HocClkProfile_HandheldChargingUSB);
|
||||
}
|
||||
|
||||
void AppProfileGui::changeTo(std::uint64_t applicationId)
|
||||
{
|
||||
SysClkTitleProfileList* profileList = new SysClkTitleProfileList;
|
||||
Result rc = sysclkIpcGetProfiles(applicationId, profileList);
|
||||
HocClkTitleProfileList* profileList = new HocClkTitleProfileList;
|
||||
Result rc = hocclkIpcGetProfiles(applicationId, profileList);
|
||||
if(R_FAILED(rc))
|
||||
{
|
||||
delete profileList;
|
||||
FatalGui::openWithResultCode("sysclkIpcGetProfiles", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetProfiles", rc);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ void AppProfileGui::update()
|
||||
{
|
||||
BaseMenuGui::update();
|
||||
|
||||
if((this->context && this->applicationId != this->context->applicationId) && this->applicationId != SYSCLK_GLOBAL_PROFILE_TID)
|
||||
if((this->context && this->applicationId != this->context->applicationId) && this->applicationId != HOCCLK_GLOBAL_PROFILE_TID)
|
||||
{
|
||||
tsl::changeTo<FatalGui>(
|
||||
"Application changed\n\n"
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
#include "base_menu_gui.h"
|
||||
#include "freq_choice_gui.h"
|
||||
#include "value_choice_gui.h"
|
||||
#define SYSCLK_GLOBAL_PROFILE_TID 0xA111111111111111
|
||||
#define HOCCLK_GLOBAL_PROFILE_TID 0xA111111111111111
|
||||
class AppProfileGui : public BaseMenuGui
|
||||
{
|
||||
protected:
|
||||
std::uint64_t applicationId;
|
||||
SysClkTitleProfileList* profileList;
|
||||
void openFreqChoiceGui(tsl::elm::ListItem* listItem, SysClkProfile profile, SysClkModule module);
|
||||
void addModuleListItem(SysClkProfile profile, SysClkModule module);
|
||||
void addModuleListItemToggle(SysClkProfile profile, SysClkModule module);
|
||||
HocClkTitleProfileList* profileList;
|
||||
void openFreqChoiceGui(tsl::elm::ListItem* listItem, HocClkProfile profile, HocClkModule module);
|
||||
void addModuleListItem(HocClkProfile profile, HocClkModule module);
|
||||
void addModuleListItemToggle(HocClkProfile profile, HocClkModule module);
|
||||
void openValueChoiceGui(
|
||||
tsl::elm::ListItem* listItem,
|
||||
std::uint32_t currentValue,
|
||||
@@ -57,8 +57,8 @@ class AppProfileGui : public BaseMenuGui
|
||||
int decimalPlaces
|
||||
);
|
||||
void addModuleListItemValue(
|
||||
SysClkProfile profile,
|
||||
SysClkModule module,
|
||||
HocClkProfile profile,
|
||||
HocClkModule module,
|
||||
const std::string& categoryName,
|
||||
std::uint32_t min,
|
||||
std::uint32_t max,
|
||||
@@ -70,10 +70,10 @@ class AppProfileGui : public BaseMenuGui
|
||||
std::vector<NamedValue> namedValues = {},
|
||||
bool showDefaultValue = true
|
||||
);
|
||||
void addGovernorSection(SysClkProfile profile);
|
||||
void addProfileUI(SysClkProfile profile);
|
||||
void addGovernorSection(HocClkProfile profile);
|
||||
void addProfileUI(HocClkProfile profile);
|
||||
public:
|
||||
AppProfileGui(std::uint64_t applicationId, SysClkTitleProfileList* profileList);
|
||||
AppProfileGui(std::uint64_t applicationId, HocClkTitleProfileList* profileList);
|
||||
~AppProfileGui();
|
||||
void listUI() override;
|
||||
static void changeTo(std::uint64_t applicationId);
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
std::string getVersionString() {
|
||||
char buf[0x100] = "";
|
||||
Result rc = sysclkIpcGetVersionString(buf, sizeof(buf));
|
||||
Result rc = hocclkIpcGetVersionString(buf, sizeof(buf));
|
||||
if (R_FAILED(rc) || buf[0] == '\0') {
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
@@ -111,9 +111,9 @@ void BaseMenuGui::preDraw(tsl::gfx::Renderer* renderer) {
|
||||
renderer->drawString(displayStrings[6], false, dataPositions[1], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // GPU real
|
||||
renderer->drawString(displayStrings[7], false, dataPositions[2], y, SMALL_TEXT_SIZE, tsl::infoTextColor); // MEM real
|
||||
|
||||
renderer->drawString(displayStrings[28], false, positions[2], y, SMALL_TEXT_SIZE, tempColors[HorizonOCThermalSensor_CPU]); // CPU Real Temp
|
||||
renderer->drawString(displayStrings[29], false, positions[3], y, SMALL_TEXT_SIZE, tempColors[HorizonOCThermalSensor_GPU]); // GPU Real Temp
|
||||
renderer->drawString(displayStrings[30], false, positions[4], y, SMALL_TEXT_SIZE, tempColors[HorizonOCThermalSensor_MEM]); // RAM Real Temp
|
||||
renderer->drawString(displayStrings[28], false, positions[2], y, SMALL_TEXT_SIZE, tempColors[HocClkThermalSensor_CPU]); // CPU Real Temp
|
||||
renderer->drawString(displayStrings[29], false, positions[3], y, SMALL_TEXT_SIZE, tempColors[HocClkThermalSensor_GPU]); // GPU Real Temp
|
||||
renderer->drawString(displayStrings[30], false, positions[4], y, SMALL_TEXT_SIZE, tempColors[HocClkThermalSensor_MEM]); // RAM Real Temp
|
||||
|
||||
// === REAL FREQUENCIES ===
|
||||
|
||||
@@ -138,9 +138,9 @@ void BaseMenuGui::preDraw(tsl::gfx::Renderer* renderer) {
|
||||
renderer->drawString(labels[7], false, positions[7], y, SMALL_TEXT_SIZE, tsl::sectionTextColor);
|
||||
|
||||
// Temperatures with color - use pre-computed colors
|
||||
renderer->drawString(displayStrings[11], false, dataPositions[0], y, SMALL_TEXT_SIZE, tempColors[SysClkThermalSensor_SOC]); // SOC
|
||||
renderer->drawString(displayStrings[12], false, dataPositions[1], y, SMALL_TEXT_SIZE, tempColors[SysClkThermalSensor_PCB]); // PCB
|
||||
renderer->drawString(displayStrings[13], false, dataPositions[2], y, SMALL_TEXT_SIZE, tempColors[SysClkThermalSensor_Skin]); // Skin
|
||||
renderer->drawString(displayStrings[11], false, dataPositions[0], y, SMALL_TEXT_SIZE, tempColors[HocClkThermalSensor_SOC]); // SOC
|
||||
renderer->drawString(displayStrings[12], false, dataPositions[1], y, SMALL_TEXT_SIZE, tempColors[HocClkThermalSensor_PCB]); // PCB
|
||||
renderer->drawString(displayStrings[13], false, dataPositions[2], y, SMALL_TEXT_SIZE, tempColors[HocClkThermalSensor_Skin]); // Skin
|
||||
|
||||
y += 20; // Direct assignment (191 + 20)
|
||||
|
||||
@@ -157,7 +157,7 @@ void BaseMenuGui::preDraw(tsl::gfx::Renderer* renderer) {
|
||||
|
||||
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[20], false, dataPositions[0], y, SMALL_TEXT_SIZE, tempColors[HocClkThermalSensor_Battery]); // Battery
|
||||
|
||||
renderer->drawString(labels[13], false, positions[4], y, SMALL_TEXT_SIZE, tsl::sectionTextColor); // disp label
|
||||
|
||||
@@ -198,19 +198,19 @@ void BaseMenuGui::refresh()
|
||||
|
||||
// Lazy context allocation
|
||||
if (!this->context) [[unlikely]] {
|
||||
this->context = new SysClkContext;
|
||||
this->context = new HocClkContext;
|
||||
}
|
||||
|
||||
// === SYSCLK CONTEXT UPDATE ===
|
||||
Result rc = sysclkIpcGetCurrentContext(this->context);
|
||||
// === HOCCLK CONTEXT UPDATE ===
|
||||
Result rc = hocclkIpcGetCurrentContext(this->context);
|
||||
if (R_FAILED(rc)) [[unlikely]] {
|
||||
FatalGui::openWithResultCode("sysclkIpcGetCurrentContext", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetCurrentContext", rc);
|
||||
return;
|
||||
}
|
||||
|
||||
rc = sysclkIpcGetConfigValues(&configList);
|
||||
rc = hocclkIpcGetConfigValues(&configList);
|
||||
if (R_FAILED(rc)) [[unlikely]] {
|
||||
FatalGui::openWithResultCode("sysclkIpcGetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetConfigValues", rc);
|
||||
return;
|
||||
}
|
||||
// dockedHighestAllowedRefreshRate = this->context->maxDisplayFreq;
|
||||
@@ -220,33 +220,33 @@ void BaseMenuGui::refresh()
|
||||
sprintf(displayStrings[0], "%016lX", context->applicationId);
|
||||
|
||||
// Profile
|
||||
strcpy(displayStrings[1], sysclkFormatProfile(context->profile, true));
|
||||
strcpy(displayStrings[1], hocclkFormatProfile(context->profile, true));
|
||||
|
||||
// Current frequencies
|
||||
u32 hz = context->freqs[SysClkModule_CPU]; // CPU
|
||||
u32 hz = context->freqs[HocClkModule_CPU]; // CPU
|
||||
sprintf(displayStrings[2], "%u.%u MHz", hz / 1000000U, (hz / 100000U) % 10U);
|
||||
|
||||
hz = context->freqs[SysClkModule_GPU]; // GPU
|
||||
hz = context->freqs[HocClkModule_GPU]; // GPU
|
||||
sprintf(displayStrings[3], "%u.%u MHz", hz / 1000000U, (hz / 100000U) % 10U);
|
||||
|
||||
hz = context->freqs[SysClkModule_MEM]; // MEM
|
||||
hz = context->freqs[HocClkModule_MEM]; // MEM
|
||||
sprintf(displayStrings[4], "%u.%u MHz", hz / 1000000U, (hz / 100000U) % 10U);
|
||||
|
||||
// Real frequencies
|
||||
hz = context->realFreqs[SysClkModule_CPU]; // CPU
|
||||
hz = context->realFreqs[HocClkModule_CPU]; // CPU
|
||||
sprintf(displayStrings[5], "%u.%u MHz", hz / 1000000U, (hz / 100000U) % 10U);
|
||||
|
||||
hz = context->realFreqs[SysClkModule_GPU]; // GPU
|
||||
hz = context->realFreqs[HocClkModule_GPU]; // GPU
|
||||
sprintf(displayStrings[6], "%u.%u MHz", hz / 1000000U, (hz / 100000U) % 10U);
|
||||
|
||||
hz = context->realFreqs[SysClkModule_MEM]; // MEM
|
||||
hz = context->realFreqs[HocClkModule_MEM]; // MEM
|
||||
sprintf(displayStrings[7], "%u.%u MHz", hz / 1000000U, (hz / 100000U) % 10U);
|
||||
|
||||
// Voltages
|
||||
sprintf(displayStrings[8], "%.1f mV", context->voltages[HocClkVoltage_CPU] / 1000.0);
|
||||
sprintf(displayStrings[9], "%.1f mV", context->voltages[HocClkVoltage_GPU] / 1000.0);
|
||||
|
||||
switch(configList.values[HorizonOCConfigValue_RAMVoltDisplayMode]) {
|
||||
switch(configList.values[HocClkConfigValue_RAMVoltDisplayMode]) {
|
||||
case RamDisplayMode_VDD2:
|
||||
sprintf(displayStrings[10], "%u.%u mV", context->voltages[HocClkVoltage_EMCVDD2] / 1000U, (context->voltages[HocClkVoltage_EMCVDD2] % 1000U) / 100U);
|
||||
break;
|
||||
@@ -259,17 +259,17 @@ void BaseMenuGui::refresh()
|
||||
}
|
||||
|
||||
// Temperatures and pre-compute colors
|
||||
u32 millis = context->temps[SysClkThermalSensor_SOC]; // SOC
|
||||
u32 millis = context->temps[HocClkThermalSensor_SOC]; // SOC
|
||||
sprintf(displayStrings[11], "%u.%u °C", millis / 1000U, (millis % 1000U) / 100U);
|
||||
tempColors[SysClkThermalSensor_SOC] = tsl::GradientColor(millis * 0.001f);
|
||||
tempColors[HocClkThermalSensor_SOC] = tsl::GradientColor(millis * 0.001f);
|
||||
|
||||
millis = context->temps[SysClkThermalSensor_PCB]; // PCB
|
||||
millis = context->temps[HocClkThermalSensor_PCB]; // PCB
|
||||
sprintf(displayStrings[12], "%u.%u °C", millis / 1000U, (millis % 1000U) / 100U);
|
||||
tempColors[SysClkThermalSensor_PCB] = tsl::GradientColor(millis * 0.001f);
|
||||
tempColors[HocClkThermalSensor_PCB] = tsl::GradientColor(millis * 0.001f);
|
||||
|
||||
millis = context->temps[SysClkThermalSensor_Skin]; // Skin
|
||||
millis = context->temps[HocClkThermalSensor_Skin]; // Skin
|
||||
sprintf(displayStrings[13], "%u.%u °C", millis / 1000U, (millis % 1000U) / 100U);
|
||||
tempColors[SysClkThermalSensor_Skin] = tsl::GradientColor(millis * 0.001f);
|
||||
tempColors[HocClkThermalSensor_Skin] = tsl::GradientColor(millis * 0.001f);
|
||||
|
||||
// SOC voltage (if available)
|
||||
sprintf(displayStrings[14], "%u mV", context->voltages[HocClkVoltage_SOC] / 1000U);
|
||||
@@ -279,12 +279,12 @@ void BaseMenuGui::refresh()
|
||||
sprintf(displayStrings[16], "%d mW", context->power[1]); // Avg
|
||||
|
||||
sprintf(displayStrings[17], "%u%%", context->partLoad[HocClkPartLoad_GPU] / 10);
|
||||
sprintf(displayStrings[18], "%u%%", context->partLoad[SysClkPartLoad_EMC] / 10);
|
||||
sprintf(displayStrings[18], "%u%%", context->partLoad[HocClkPartLoad_EMC] / 10);
|
||||
sprintf(displayStrings[19], "%u%%", context->partLoad[HocClkPartLoad_CPUMax] / 10);
|
||||
|
||||
millis = context->temps[HorizonOCThermalSensor_Battery]; // Battery
|
||||
millis = context->temps[HocClkThermalSensor_Battery]; // Battery
|
||||
sprintf(displayStrings[20], "%u.%u °C", millis / 1000U, (millis % 1000U) / 100U);
|
||||
tempColors[HorizonOCThermalSensor_Battery] = tsl::GradientColor(millis * 0.001f);
|
||||
tempColors[HocClkThermalSensor_Battery] = tsl::GradientColor(millis * 0.001f);
|
||||
|
||||
sprintf(displayStrings[21], "%d mV", context->voltages[HocClkVoltage_Battery]); // BAT AVG
|
||||
|
||||
@@ -292,7 +292,7 @@ void BaseMenuGui::refresh()
|
||||
|
||||
sprintf(displayStrings[24], "%u%%", context->partLoad[HocClkPartLoad_FAN]);
|
||||
|
||||
sprintf(displayStrings[25], "%u Hz", context->realFreqs[HorizonOCModule_Display]);
|
||||
sprintf(displayStrings[25], "%u Hz", context->realFreqs[HocClkModule_Display]);
|
||||
if(this->context->isSaltyNXInstalled) {
|
||||
if(context->fps == 254) {
|
||||
strcpy(displayStrings[26], "N/A");
|
||||
@@ -311,17 +311,17 @@ void BaseMenuGui::refresh()
|
||||
}
|
||||
}
|
||||
|
||||
millis = context->temps[HorizonOCThermalSensor_CPU];
|
||||
millis = context->temps[HocClkThermalSensor_CPU];
|
||||
sprintf(displayStrings[28], "%u.%u", millis / 1000U, (millis % 1000U) / 100U);
|
||||
tempColors[HorizonOCThermalSensor_CPU] = tsl::GradientColor(millis * 0.001f);
|
||||
tempColors[HocClkThermalSensor_CPU] = tsl::GradientColor(millis * 0.001f);
|
||||
|
||||
millis = context->temps[HorizonOCThermalSensor_GPU];
|
||||
millis = context->temps[HocClkThermalSensor_GPU];
|
||||
sprintf(displayStrings[29], "%u.%u", millis / 1000U, (millis % 1000U) / 100U);
|
||||
tempColors[HorizonOCThermalSensor_GPU] = tsl::GradientColor(millis * 0.001f);
|
||||
tempColors[HocClkThermalSensor_GPU] = tsl::GradientColor(millis * 0.001f);
|
||||
|
||||
millis = context->temps[HorizonOCThermalSensor_MEM];
|
||||
millis = context->temps[HocClkThermalSensor_MEM];
|
||||
sprintf(displayStrings[30], "%u.%u", millis / 1000U, (millis % 1000U) / 100U);
|
||||
tempColors[HorizonOCThermalSensor_MEM] = tsl::GradientColor(millis * 0.001f);
|
||||
tempColors[HocClkThermalSensor_MEM] = tsl::GradientColor(millis * 0.001f);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@ class BaseMenuGui : public BaseGui
|
||||
|
||||
public:
|
||||
// u8 dockedHighestAllowedRefreshRate = 60;
|
||||
SysClkContext* context;
|
||||
HocClkContext* context;
|
||||
std::uint64_t lastContextUpdate;
|
||||
SysClkConfigValueList configList;
|
||||
HocClkConfigValueList configList;
|
||||
bool g_hardwareModelCached = false;
|
||||
bool g_isMariko = false;
|
||||
bool g_isAula = false;
|
||||
@@ -87,5 +87,5 @@ class BaseMenuGui : public BaseGui
|
||||
|
||||
private:
|
||||
char displayStrings[48][32]; // Pre-formatted display strings
|
||||
tsl::Color tempColors[SysClkThermalSensor_EnumMax]; // Pre-computed temperature colors
|
||||
tsl::Color tempColors[HocClkThermalSensor_EnumMax]; // Pre-computed temperature colors
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
FreqChoiceGui::FreqChoiceGui(std::uint32_t selectedHz,
|
||||
std::uint32_t* hzList,
|
||||
std::uint32_t hzCount,
|
||||
SysClkModule module,
|
||||
HocClkModule module,
|
||||
FreqChoiceListener listener,
|
||||
bool checkMax,
|
||||
std::map<uint32_t, std::string> labels)
|
||||
@@ -45,7 +45,7 @@ FreqChoiceGui::FreqChoiceGui(std::uint32_t selectedHz,
|
||||
this->listener = listener;
|
||||
this->checkMax = checkMax;
|
||||
this->labels = labels;
|
||||
this->configList = new SysClkConfigValueList {};
|
||||
this->configList = new HocClkConfigValueList {};
|
||||
}
|
||||
|
||||
FreqChoiceGui::~FreqChoiceGui()
|
||||
@@ -106,10 +106,10 @@ tsl::elm::ListItem* FreqChoiceGui::createFreqListItem(std::uint32_t hz, bool sel
|
||||
|
||||
void FreqChoiceGui::listUI()
|
||||
{
|
||||
sysclkIpcGetConfigValues(this->configList);
|
||||
hocclkIpcGetConfigValues(this->configList);
|
||||
|
||||
// Header based on CPU/GPU/MEM module
|
||||
std::string moduleName = sysclkFormatModule(this->module, false);
|
||||
std::string moduleName = hocclkFormatModule(this->module, false);
|
||||
this->listElement->addItem(new tsl::elm::CategoryHeader(moduleName));
|
||||
|
||||
// Default option
|
||||
|
||||
@@ -37,11 +37,11 @@ using FreqChoiceListener = std::function<bool(std::uint32_t hz)>;
|
||||
class FreqChoiceGui : public BaseMenuGui
|
||||
{
|
||||
protected:
|
||||
SysClkConfigValueList* configList;
|
||||
HocClkConfigValueList* configList;
|
||||
std::uint32_t selectedHz;
|
||||
std::uint32_t* hzList;
|
||||
std::uint32_t hzCount;
|
||||
SysClkModule module;
|
||||
HocClkModule module;
|
||||
FreqChoiceListener listener;
|
||||
bool checkMax;
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
FreqChoiceGui(std::uint32_t selectedHz,
|
||||
std::uint32_t* hzList,
|
||||
std::uint32_t hzCount,
|
||||
SysClkModule module,
|
||||
HocClkModule module,
|
||||
FreqChoiceListener listener,
|
||||
bool checkMax = true,
|
||||
std::map<uint32_t, std::string> labels = {});
|
||||
|
||||
@@ -24,37 +24,37 @@
|
||||
|
||||
GlobalOverrideGui::GlobalOverrideGui()
|
||||
{
|
||||
for (std::uint16_t m = 0; m < SysClkModule_EnumMax; m++) {
|
||||
for (std::uint16_t m = 0; m < HocClkModule_EnumMax; m++) {
|
||||
this->listItems[m] = nullptr;
|
||||
this->listHz[m] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void GlobalOverrideGui::openFreqChoiceGui(SysClkModule module)
|
||||
void GlobalOverrideGui::openFreqChoiceGui(HocClkModule module)
|
||||
{
|
||||
std::uint32_t hzList[SYSCLK_FREQ_LIST_MAX];
|
||||
std::uint32_t hzList[HOCCLK_FREQ_LIST_MAX];
|
||||
std::uint32_t hzCount;
|
||||
Result rc =
|
||||
sysclkIpcGetFreqList(module, &hzList[0], SYSCLK_FREQ_LIST_MAX, &hzCount);
|
||||
hocclkIpcGetFreqList(module, &hzList[0], HOCCLK_FREQ_LIST_MAX, &hzCount);
|
||||
if (R_FAILED(rc)) {
|
||||
FatalGui::openWithResultCode("sysclkIpcGetFreqList", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetFreqList", rc);
|
||||
return;
|
||||
}
|
||||
|
||||
std::map<uint32_t, std::string> labels = {};
|
||||
|
||||
if (module == SysClkModule_CPU) {
|
||||
if (module == HocClkModule_CPU) {
|
||||
bool isUsingUv = IsMariko() ? configList.values[KipConfigValue_marikoCpuUVHigh] : configList.values[KipConfigValue_eristaCpuUV];
|
||||
labels = IsMariko() ? (isUsingUv ? cpu_freq_label_m_uv : cpu_freq_label_m) : (isUsingUv ? cpu_freq_label_e_uv : cpu_freq_label_e);
|
||||
} else if (module == SysClkModule_GPU) {
|
||||
} else if (module == HocClkModule_GPU) {
|
||||
labels = IsMariko() ? *(marikoUV[configList.values[KipConfigValue_marikoGpuUV]]) : *(eristaUV[configList.values[KipConfigValue_eristaGpuUV]]);
|
||||
}
|
||||
tsl::changeTo<FreqChoiceGui>(
|
||||
this->context->overrideFreqs[module], hzList, hzCount, module,
|
||||
[this, module](std::uint32_t hz) {
|
||||
Result rc = sysclkIpcSetOverride(module, hz);
|
||||
Result rc = hocclkIpcSetOverride(module, hz);
|
||||
if (R_FAILED(rc)) {
|
||||
FatalGui::openWithResultCode("sysclkIpcSetOverride", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetOverride", rc);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ void GlobalOverrideGui::openValueChoiceGui(
|
||||
}
|
||||
|
||||
void GlobalOverrideGui::addModuleListItemValue(
|
||||
SysClkModule module,
|
||||
HocClkModule module,
|
||||
const std::string& categoryName,
|
||||
std::uint32_t min,
|
||||
std::uint32_t max,
|
||||
@@ -115,7 +115,7 @@ void GlobalOverrideGui::addModuleListItemValue(
|
||||
}
|
||||
|
||||
tsl::elm::ListItem* listItem =
|
||||
new tsl::elm::ListItem(sysclkFormatModule(module, true));
|
||||
new tsl::elm::ListItem(hocclkFormatModule(module, true));
|
||||
|
||||
listItem->setValue(FREQ_DEFAULT_TEXT);
|
||||
|
||||
@@ -191,12 +191,12 @@ void GlobalOverrideGui::addModuleListItemValue(
|
||||
}
|
||||
|
||||
Result rc =
|
||||
sysclkIpcSetOverride(module, this->context->overrideFreqs[module]);
|
||||
hocclkIpcSetOverride(module, this->context->overrideFreqs[module]);
|
||||
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
FatalGui::openWithResultCode(
|
||||
"sysclkIpcSetOverride", rc);
|
||||
"hocclkIpcSetOverride", rc);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -223,11 +223,11 @@ void GlobalOverrideGui::addModuleListItemValue(
|
||||
this->listHz[module] = 0;
|
||||
listItem->setValue(FREQ_DEFAULT_TEXT);
|
||||
|
||||
Result rc = sysclkIpcSetOverride(module, 0);
|
||||
Result rc = hocclkIpcSetOverride(module, 0);
|
||||
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
FatalGui::openWithResultCode("sysclkIpcSetOverride", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetOverride", rc);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -242,19 +242,19 @@ void GlobalOverrideGui::addModuleListItemValue(
|
||||
this->listItems[module] = listItem;
|
||||
}
|
||||
|
||||
void GlobalOverrideGui::addModuleListItem(SysClkModule module)
|
||||
void GlobalOverrideGui::addModuleListItem(HocClkModule module)
|
||||
{
|
||||
tsl::elm::ListItem *listItem =
|
||||
new tsl::elm::ListItem(sysclkFormatModule(module, true));
|
||||
new tsl::elm::ListItem(hocclkFormatModule(module, true));
|
||||
listItem->setValue(formatListFreqMHz(0));
|
||||
listItem->setClickListener([this, module](u64 keys) {
|
||||
if ((keys & HidNpadButton_A) == HidNpadButton_A) {
|
||||
this->openFreqChoiceGui(module);
|
||||
return true;
|
||||
} else if ((keys & HidNpadButton_Y) == HidNpadButton_Y) {
|
||||
Result rc = sysclkIpcSetOverride(module, 0);
|
||||
Result rc = hocclkIpcSetOverride(module, 0);
|
||||
if (R_FAILED(rc)) {
|
||||
FatalGui::openWithResultCode("sysclkIpcSetOverride", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetOverride", rc);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -273,18 +273,18 @@ void GlobalOverrideGui::addModuleListItem(SysClkModule module)
|
||||
this->listItems[module] = listItem;
|
||||
}
|
||||
|
||||
void GlobalOverrideGui::addModuleToggleItem(SysClkModule module)
|
||||
void GlobalOverrideGui::addModuleToggleItem(HocClkModule module)
|
||||
{
|
||||
const char *moduleName = sysclkFormatModule(module, true);
|
||||
const char *moduleName = hocclkFormatModule(module, true);
|
||||
bool isOn = this->listHz[module];
|
||||
|
||||
tsl::elm::ToggleListItem *toggle =
|
||||
new tsl::elm::ToggleListItem(moduleName, isOn);
|
||||
|
||||
toggle->setStateChangedListener([this, module, toggle](bool state) {
|
||||
Result rc = sysclkIpcSetOverride(module, state ? 1 : 0);
|
||||
Result rc = hocclkIpcSetOverride(module, state ? 1 : 0);
|
||||
if (R_FAILED(rc)) {
|
||||
FatalGui::openWithResultCode("sysclkIpcSetProfiles", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetProfiles", rc);
|
||||
}
|
||||
this->lastContextUpdate = armGetSystemTick();
|
||||
this->context->overrideFreqs[module] = 0;
|
||||
@@ -300,9 +300,9 @@ public:
|
||||
GovernorOverrideSubMenuGui(u32 initialPacked) : packed(initialPacked) {}
|
||||
|
||||
void listUI() override {
|
||||
Result rc = sysclkIpcGetConfigValues(&configList); // idk why this is needed, probably some refreshing issue
|
||||
Result rc = hocclkIpcGetConfigValues(&configList); // idk why this is needed, probably some refreshing issue
|
||||
if (R_FAILED(rc)) [[unlikely]] {
|
||||
FatalGui::openWithResultCode("sysclkIpcGetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetConfigValues", rc);
|
||||
return;
|
||||
}
|
||||
this->listElement->addItem(new tsl::elm::CategoryHeader("Governor"));
|
||||
@@ -310,7 +310,7 @@ public:
|
||||
static constexpr struct { const char* label; int shift; } kAll[] = {
|
||||
{"CPU", 0}, {"GPU", 8}, {"VRR", 16}
|
||||
};
|
||||
int count = configList.values[HorizonOCConfigValue_OverwriteRefreshRate] ? 3 : 2;
|
||||
int count = configList.values[HocClkConfigValue_OverwriteRefreshRate] ? 3 : 2;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
u8 cur = (this->packed >> kAll[i].shift) & 0xFF;
|
||||
@@ -322,8 +322,8 @@ public:
|
||||
int shift = kAll[i].shift;
|
||||
bar->setValueChangedListener([this, shift](u8 value) {
|
||||
this->packed = (this->packed & ~(0xFFu << shift)) | ((u32)value << shift);
|
||||
Result rc = sysclkIpcSetOverride(HorizonOCModule_Governor, this->packed);
|
||||
if (R_FAILED(rc)) FatalGui::openWithResultCode("sysclkIpcSetOverride", rc);
|
||||
Result rc = hocclkIpcSetOverride(HocClkModule_Governor, this->packed);
|
||||
if (R_FAILED(rc)) FatalGui::openWithResultCode("hocclkIpcSetOverride", rc);
|
||||
this->lastContextUpdate = armGetSystemTick();
|
||||
});
|
||||
this->listElement->addItem(bar);
|
||||
@@ -336,7 +336,7 @@ void GlobalOverrideGui::addGovernorSection() {
|
||||
item->setValue("\u2192"); // right arrow
|
||||
item->setClickListener([this](u64 keys) {
|
||||
if (keys & HidNpadButton_A) {
|
||||
u32 packed = this->context ? this->context->overrideFreqs[HorizonOCModule_Governor] : 0;
|
||||
u32 packed = this->context ? this->context->overrideFreqs[HocClkModule_Governor] : 0;
|
||||
tsl::changeTo<GovernorOverrideSubMenuGui>(packed);
|
||||
return true;
|
||||
}
|
||||
@@ -351,21 +351,21 @@ void GlobalOverrideGui::listUI()
|
||||
if(!this->context)
|
||||
return;
|
||||
|
||||
Result rc = sysclkIpcGetConfigValues(&configList); // idk why this is needed, probably some refreshing issue
|
||||
Result rc = hocclkIpcGetConfigValues(&configList); // idk why this is needed, probably some refreshing issue
|
||||
if (R_FAILED(rc)) [[unlikely]] {
|
||||
FatalGui::openWithResultCode("sysclkIpcGetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetConfigValues", rc);
|
||||
return;
|
||||
}
|
||||
|
||||
this->listElement->addItem(new tsl::elm::CategoryHeader(
|
||||
"Temporary Overrides " + ult::DIVIDER_SYMBOL + " \ue0e3 Reset"));
|
||||
this->addModuleListItem(SysClkModule_CPU);
|
||||
this->addModuleListItem(SysClkModule_GPU);
|
||||
this->addModuleListItem(SysClkModule_MEM);
|
||||
this->addModuleListItem(HocClkModule_CPU);
|
||||
this->addModuleListItem(HocClkModule_GPU);
|
||||
this->addModuleListItem(HocClkModule_MEM);
|
||||
#if IS_MINIMAL == 0
|
||||
ValueThresholds lcdThresholds(60, 65);
|
||||
if(configList.values[HorizonOCConfigValue_OverwriteRefreshRate])
|
||||
this->addModuleListItemValue(HorizonOCModule_Display, "Display", IsAula() ? 45 : 40, configList.values[HorizonOCConfigValue_MaxDisplayClockH], this->context->isUsingRetroSuper ? 5 : 1, " Hz", 1, 0, lcdThresholds);
|
||||
if(configList.values[HocClkConfigValue_OverwriteRefreshRate])
|
||||
this->addModuleListItemValue(HocClkModule_Display, "Display", IsAula() ? 45 : 40, configList.values[HocClkConfigValue_MaxDisplayClockH], this->context->isUsingRetroSuper ? 5 : 1, " Hz", 1, 0, lcdThresholds);
|
||||
#endif
|
||||
|
||||
this->addGovernorSection();
|
||||
@@ -378,8 +378,8 @@ void GlobalOverrideGui::refresh()
|
||||
if (!this->context)
|
||||
return;
|
||||
|
||||
for (std::uint16_t m = 0; m < SysClkModule_EnumMax; m++) {
|
||||
if (m == HorizonOCModule_Governor) {
|
||||
for (std::uint16_t m = 0; m < HocClkModule_EnumMax; m++) {
|
||||
if (m == HocClkModule_Governor) {
|
||||
this->listHz[m] = this->context->overrideFreqs[m];
|
||||
continue;
|
||||
}
|
||||
@@ -387,7 +387,7 @@ void GlobalOverrideGui::refresh()
|
||||
if (this->listItems[m] != nullptr &&
|
||||
this->listHz[m] != this->context->overrideFreqs[m]) {
|
||||
|
||||
auto it = this->customFormatModules.find((SysClkModule)m);
|
||||
auto it = this->customFormatModules.find((HocClkModule)m);
|
||||
if (it != this->customFormatModules.end()) {
|
||||
std::string suffix = std::get<0>(it->second);
|
||||
std::uint32_t divisor = std::get<1>(it->second);
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
class GlobalOverrideGui : public BaseMenuGui
|
||||
{
|
||||
protected:
|
||||
std::map<SysClkModule, std::tuple<std::string, std::uint32_t, int>> customFormatModules;
|
||||
tsl::elm::ListItem* listItems[SysClkModule_EnumMax];
|
||||
std::uint32_t listHz[SysClkModule_EnumMax];
|
||||
void openFreqChoiceGui(SysClkModule module);
|
||||
std::map<HocClkModule, std::tuple<std::string, std::uint32_t, int>> customFormatModules;
|
||||
tsl::elm::ListItem* listItems[HocClkModule_EnumMax];
|
||||
std::uint32_t listHz[HocClkModule_EnumMax];
|
||||
void openFreqChoiceGui(HocClkModule module);
|
||||
void addGovernorSection();
|
||||
void addModuleListItem(SysClkModule module);
|
||||
void addModuleToggleItem(SysClkModule module);
|
||||
void addModuleListItem(HocClkModule module);
|
||||
void addModuleToggleItem(HocClkModule module);
|
||||
void openValueChoiceGui(
|
||||
tsl::elm::ListItem* listItem,
|
||||
std::uint32_t currentValue,
|
||||
@@ -53,7 +53,7 @@ class GlobalOverrideGui : public BaseMenuGui
|
||||
bool showDefaultValue
|
||||
);
|
||||
void addModuleListItemValue(
|
||||
SysClkModule module,
|
||||
HocClkModule module,
|
||||
const std::string& categoryName,
|
||||
std::uint32_t min,
|
||||
std::uint32_t max,
|
||||
@@ -70,5 +70,5 @@ class GlobalOverrideGui : public BaseMenuGui
|
||||
~GlobalOverrideGui() {}
|
||||
void listUI() override;
|
||||
void refresh() override;
|
||||
void setModuleCustomFormat(SysClkModule module, const std::string& suffix, std::uint32_t divisor, int decimalPlaces);
|
||||
void setModuleCustomFormat(HocClkModule module, const std::string& suffix, std::uint32_t divisor, int decimalPlaces);
|
||||
};
|
||||
@@ -37,10 +37,10 @@ void MainGui::listUI()
|
||||
{
|
||||
// this->enabledToggle = new tsl::elm::ToggleListItem("Enable", false);
|
||||
// enabledToggle->setStateChangedListener([this](bool state) {
|
||||
// Result rc = sysclkIpcSetEnabled(state);
|
||||
// Result rc = hocclkIpcSetEnabled(state);
|
||||
// if(R_FAILED(rc))
|
||||
// {
|
||||
// FatalGui::openWithResultCode("sysclkIpcSetEnabled", rc);
|
||||
// FatalGui::openWithResultCode("hocclkIpcSetEnabled", rc);
|
||||
// }
|
||||
|
||||
// this->lastContextUpdate = armGetSystemTick();
|
||||
@@ -65,7 +65,7 @@ void MainGui::listUI()
|
||||
globalProfileItem->setClickListener([this](u64 keys) {
|
||||
if((keys & HidNpadButton_A) == HidNpadButton_A && this->context)
|
||||
{
|
||||
AppProfileGui::changeTo(SYSCLK_GLOBAL_PROFILE_TID);
|
||||
AppProfileGui::changeTo(HOCCLK_GLOBAL_PROFILE_TID);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class RamTableEditor;
|
||||
|
||||
MiscGui::MiscGui()
|
||||
{
|
||||
this->configList = new SysClkConfigValueList {};
|
||||
this->configList = new HocClkConfigValueList {};
|
||||
}
|
||||
|
||||
MiscGui::~MiscGui()
|
||||
@@ -57,14 +57,14 @@ MiscGui::~MiscGui()
|
||||
this->configRanges.clear();
|
||||
}
|
||||
|
||||
void MiscGui::addConfigToggle(SysClkConfigValue configVal, const char* altName) {
|
||||
const char* configName = altName ? altName : sysclkFormatConfigValue(configVal, true);
|
||||
void MiscGui::addConfigToggle(HocClkConfigValue configVal, const char* altName) {
|
||||
const char* configName = altName ? altName : hocclkFormatConfigValue(configVal, true);
|
||||
tsl::elm::ToggleListItem* toggle = new tsl::elm::ToggleListItem(configName, this->configList->values[configVal]);
|
||||
toggle->setStateChangedListener([this, configVal](bool state) {
|
||||
this->configList->values[configVal] = uint64_t(state);
|
||||
Result rc = sysclkIpcSetConfigValues(this->configList);
|
||||
Result rc = hocclkIpcSetConfigValues(this->configList);
|
||||
if (R_FAILED(rc))
|
||||
FatalGui::openWithResultCode("sysclkIpcSetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetConfigValues", rc);
|
||||
this->lastContextUpdate = armGetSystemTick();
|
||||
});
|
||||
this->listElement->addItem(toggle);
|
||||
@@ -72,7 +72,7 @@ void MiscGui::addConfigToggle(SysClkConfigValue configVal, const char* altName)
|
||||
}
|
||||
|
||||
|
||||
void MiscGui::addConfigButton(SysClkConfigValue configVal,
|
||||
void MiscGui::addConfigButton(HocClkConfigValue configVal,
|
||||
const char* altName,
|
||||
const ValueRange& range,
|
||||
const std::string& categoryName,
|
||||
@@ -81,7 +81,7 @@ void MiscGui::addConfigButton(SysClkConfigValue configVal,
|
||||
const std::vector<NamedValue>& namedValues,
|
||||
bool showDefaultValue)
|
||||
{
|
||||
const char* configName = altName ? altName : sysclkFormatConfigValue(configVal, true);
|
||||
const char* configName = altName ? altName : hocclkFormatConfigValue(configVal, true);
|
||||
|
||||
tsl::elm::ListItem* listItem = new tsl::elm::ListItem(configName);
|
||||
|
||||
@@ -128,9 +128,9 @@ void MiscGui::addConfigButton(SysClkConfigValue configVal,
|
||||
categoryName,
|
||||
[this, configVal](std::uint32_t value) {
|
||||
this->configList->values[configVal] = value;
|
||||
Result rc = sysclkIpcSetConfigValues(this->configList);
|
||||
Result rc = hocclkIpcSetConfigValues(this->configList);
|
||||
if (R_FAILED(rc)) {
|
||||
FatalGui::openWithResultCode("sysclkIpcSetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetConfigValues", rc);
|
||||
return false;
|
||||
}
|
||||
this->lastContextUpdate = armGetSystemTick();
|
||||
@@ -150,9 +150,9 @@ void MiscGui::addConfigButton(SysClkConfigValue configVal,
|
||||
categoryName,
|
||||
[this, configVal](std::uint32_t value) {
|
||||
this->configList->values[configVal] = value;
|
||||
Result rc = sysclkIpcSetConfigValues(this->configList);
|
||||
Result rc = hocclkIpcSetConfigValues(this->configList);
|
||||
if (R_FAILED(rc)) {
|
||||
FatalGui::openWithResultCode("sysclkIpcSetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetConfigValues", rc);
|
||||
return false;
|
||||
}
|
||||
this->lastContextUpdate = armGetSystemTick();
|
||||
@@ -175,7 +175,7 @@ void MiscGui::addConfigButton(SysClkConfigValue configVal,
|
||||
this->configNamedValues[configVal] = namedValues;
|
||||
}
|
||||
|
||||
void MiscGui::addConfigButtonS(SysClkConfigValue configVal,
|
||||
void MiscGui::addConfigButtonS(HocClkConfigValue configVal,
|
||||
const char* altName,
|
||||
const ValueRange& range,
|
||||
const std::string& categoryName,
|
||||
@@ -232,9 +232,9 @@ void MiscGui::addConfigButtonS(SysClkConfigValue configVal,
|
||||
categoryName,
|
||||
[this, configVal](std::uint32_t value) {
|
||||
this->configList->values[configVal] = value;
|
||||
Result rc = sysclkIpcSetConfigValues(this->configList);
|
||||
Result rc = hocclkIpcSetConfigValues(this->configList);
|
||||
if (R_FAILED(rc)) {
|
||||
FatalGui::openWithResultCode("sysclkIpcSetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetConfigValues", rc);
|
||||
return false;
|
||||
}
|
||||
this->lastContextUpdate = armGetSystemTick();
|
||||
@@ -254,9 +254,9 @@ void MiscGui::addConfigButtonS(SysClkConfigValue configVal,
|
||||
categoryName,
|
||||
[this, configVal](std::uint32_t value) {
|
||||
this->configList->values[configVal] = value;
|
||||
Result rc = sysclkIpcSetConfigValues(this->configList);
|
||||
Result rc = hocclkIpcSetConfigValues(this->configList);
|
||||
if (R_FAILED(rc)) {
|
||||
FatalGui::openWithResultCode("sysclkIpcSetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetConfigValues", rc);
|
||||
return false;
|
||||
}
|
||||
this->lastContextUpdate = armGetSystemTick();
|
||||
@@ -289,12 +289,12 @@ void MiscGui::updateConfigToggles() {
|
||||
}
|
||||
}
|
||||
|
||||
void MiscGui::addFreqButton(SysClkConfigValue configVal,
|
||||
void MiscGui::addFreqButton(HocClkConfigValue configVal,
|
||||
const char* altName,
|
||||
SysClkModule module,
|
||||
HocClkModule module,
|
||||
const std::map<uint32_t, std::string>& labels)
|
||||
{
|
||||
const char* configName = altName ? altName : sysclkFormatConfigValue(configVal, true);
|
||||
const char* configName = altName ? altName : hocclkFormatConfigValue(configVal, true);
|
||||
|
||||
tsl::elm::ListItem* listItem = new tsl::elm::ListItem(configName);
|
||||
|
||||
@@ -309,12 +309,12 @@ void MiscGui::addFreqButton(SysClkConfigValue configVal,
|
||||
if ((keys & HidNpadButton_A) == 0)
|
||||
return false;
|
||||
|
||||
std::uint32_t hzList[SYSCLK_FREQ_LIST_MAX];
|
||||
std::uint32_t hzList[HOCCLK_FREQ_LIST_MAX];
|
||||
std::uint32_t hzCount;
|
||||
|
||||
Result rc = sysclkIpcGetFreqList(module, hzList, SYSCLK_FREQ_LIST_MAX, &hzCount);
|
||||
Result rc = hocclkIpcGetFreqList(module, hzList, HOCCLK_FREQ_LIST_MAX, &hzCount);
|
||||
if (R_FAILED(rc)) {
|
||||
FatalGui::openWithResultCode("sysclkIpcGetFreqList", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetFreqList", rc);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -330,9 +330,9 @@ void MiscGui::addFreqButton(SysClkConfigValue configVal,
|
||||
uint64_t mhz = hz / 1'000'000;
|
||||
this->configList->values[configVal] = mhz;
|
||||
|
||||
Result rc = sysclkIpcSetConfigValues(this->configList);
|
||||
Result rc = hocclkIpcSetConfigValues(this->configList);
|
||||
if (R_FAILED(rc)) {
|
||||
FatalGui::openWithResultCode("sysclkIpcSetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcSetConfigValues", rc);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -354,9 +354,9 @@ void MiscGui::addFreqButton(SysClkConfigValue configVal,
|
||||
|
||||
void MiscGui::listUI()
|
||||
{
|
||||
Result rc = sysclkIpcGetConfigValues(configList);
|
||||
Result rc = hocclkIpcGetConfigValues(configList);
|
||||
if (R_FAILED(rc)) [[unlikely]] {
|
||||
FatalGui::openWithResultCode("sysclkIpcGetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetConfigValues", rc);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -471,16 +471,16 @@ void MiscGui::listUI()
|
||||
// NamedValue("2816mA", 2816),
|
||||
// NamedValue("3072mA", 3072),
|
||||
// };
|
||||
if(this->configList->values[HorizonOCConfigValue_EnableExperimentalSettings]) {
|
||||
if(this->configList->values[HocClkConfigValue_EnableExperimentalSettings]) {
|
||||
this->listElement->addItem(new tsl::elm::CategoryHeader("Experimental"));
|
||||
|
||||
addConfigToggle(HorizonOCConfigValue_LiveCpuUv, nullptr);
|
||||
addConfigToggle(HocClkConfigValue_LiveCpuUv, nullptr);
|
||||
std::vector<NamedValue> gpuSchedMethodValues = {
|
||||
NamedValue("INI", GpuSchedulingOverrideMethod_Ini),
|
||||
NamedValue("NV Service", GpuSchedulingOverrideMethod_NvService),
|
||||
};
|
||||
addConfigButton(
|
||||
HorizonOCConfigValue_GPUSchedulingMethod,
|
||||
HocClkConfigValue_GPUSchedulingMethod,
|
||||
"GPU Scheduling Override Method",
|
||||
ValueRange(0, 0, 1, "", 0),
|
||||
"GPU Scheduling Override Method",
|
||||
@@ -514,7 +514,7 @@ void MiscGui::listUI()
|
||||
ValueThresholds chargerThresholds(2048, 2049);
|
||||
|
||||
addConfigButton(
|
||||
HorizonOCConfigValue_BatteryChargeCurrent,
|
||||
HocClkConfigValue_BatteryChargeCurrent,
|
||||
"Charge Current Override",
|
||||
ValueRange(0, 0, 1, "", 0),
|
||||
"Charge Current Override",
|
||||
@@ -539,7 +539,7 @@ void MiscGui::listUI()
|
||||
ValueThresholds chargerThresholds(1792, 1793);
|
||||
|
||||
addConfigButton(
|
||||
HorizonOCConfigValue_BatteryChargeCurrent,
|
||||
HocClkConfigValue_BatteryChargeCurrent,
|
||||
"Charge Current Override",
|
||||
ValueRange(0, 0, 1, "", 0),
|
||||
"Charge Current Override",
|
||||
@@ -567,10 +567,10 @@ protected:
|
||||
NamedValue("VDDQ", RamDisplayMode_VDDQ),
|
||||
};
|
||||
|
||||
addConfigButton(HorizonOCConfigValue_RAMVoltDisplayMode, "RAM Voltage Display Mode", ValueRange(0, 12, 1, "", 0), "RAM Voltage Display Mode", &thresholdsDisabled, {}, ramVoltDispModes, false);
|
||||
addConfigButton(HocClkConfigValue_RAMVoltDisplayMode, "RAM Voltage Display Mode", ValueRange(0, 12, 1, "", 0), "RAM Voltage Display Mode", &thresholdsDisabled, {}, ramVoltDispModes, false);
|
||||
|
||||
addConfigButton(
|
||||
SysClkConfigValue_PollingIntervalMs,
|
||||
HocClkConfigValue_PollingIntervalMs,
|
||||
"Polling Interval",
|
||||
ValueRange(50, 1000, 50, "ms", 1),
|
||||
"Polling Interval",
|
||||
@@ -601,7 +601,7 @@ protected:
|
||||
};
|
||||
|
||||
addConfigButton(
|
||||
HorizonOCConfigValue_CpuGovernorMinimumFreq,
|
||||
HocClkConfigValue_CpuGovernorMinimumFreq,
|
||||
"CPU Governor Minimum Frequency",
|
||||
ValueRange(0, 0, 1, "", 0),
|
||||
"CPU Governor Minimum Frequency",
|
||||
@@ -626,7 +626,7 @@ protected:
|
||||
return;
|
||||
|
||||
this->listElement->addItem(new tsl::elm::CategoryHeader("Display Settings"));
|
||||
addConfigToggle(HorizonOCConfigValue_OverwriteRefreshRate, nullptr);
|
||||
addConfigToggle(HocClkConfigValue_OverwriteRefreshRate, nullptr);
|
||||
if(!this->context->isUsingRetroSuper) {
|
||||
tsl::elm::CustomDrawer* warningText = new tsl::elm::CustomDrawer([](tsl::gfx::Renderer *renderer, s32 x, s32 y, s32 w, s32 h) {
|
||||
renderer->drawString("\uE150 Usage of unsafe display", false, x + 20, y + 30, 18, tsl::style::color::ColorText);
|
||||
@@ -639,7 +639,7 @@ protected:
|
||||
this->listElement->addItem(warningText);
|
||||
ValueThresholds displayThresholds(60, 65);
|
||||
addConfigButton(
|
||||
HorizonOCConfigValue_MaxDisplayClockH,
|
||||
HocClkConfigValue_MaxDisplayClockH,
|
||||
"Max Handheld Display",
|
||||
ValueRange(60, IsAula() ? 65 : 75, 1, " Hz", 1),
|
||||
"Display Clock",
|
||||
@@ -958,9 +958,9 @@ public:
|
||||
|
||||
protected:
|
||||
void listUI() override {
|
||||
Result rc = sysclkIpcGetConfigValues(this->configList); // populate config list early otherwise wont work
|
||||
Result rc = hocclkIpcGetConfigValues(this->configList); // populate config list early otherwise wont work
|
||||
if (R_FAILED(rc)) [[unlikely]] {
|
||||
FatalGui::openWithResultCode("sysclkIpcGetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetConfigValues", rc);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1369,7 +1369,7 @@ protected:
|
||||
};
|
||||
|
||||
addConfigButton(
|
||||
HorizonOCConfigValue_GPUScheduling,
|
||||
HocClkConfigValue_GPUScheduling,
|
||||
"GPU Scheduling Override",
|
||||
ValueRange(0, 0, 1, "", 0),
|
||||
"GPU Scheduling Override",
|
||||
@@ -1410,7 +1410,7 @@ protected:
|
||||
};
|
||||
|
||||
addConfigButton(
|
||||
HorizonOCConfigValue_DVFSMode,
|
||||
HocClkConfigValue_DVFSMode,
|
||||
"GPU DVFS Mode",
|
||||
ValueRange(0, 0, 1, "", 0),
|
||||
"GPU DVFS Mode",
|
||||
@@ -1420,7 +1420,7 @@ protected:
|
||||
false
|
||||
);
|
||||
|
||||
addConfigButton(HorizonOCConfigValue_DVFSOffset, "GPU DVFS Offset", ValueRange(0, 12, 1, "", 0), "GPU DVFS Offset", &thresholdsDisabled, {}, dvfsOffset, false);
|
||||
addConfigButton(HocClkConfigValue_DVFSOffset, "GPU DVFS Offset", ValueRange(0, 12, 1, "", 0), "GPU DVFS Offset", &thresholdsDisabled, {}, dvfsOffset, false);
|
||||
}
|
||||
|
||||
tsl::elm::ListItem* customTableSubmenu = new tsl::elm::ListItem("GPU Voltage Table");
|
||||
@@ -1443,9 +1443,9 @@ public:
|
||||
protected:
|
||||
void listUI() override {
|
||||
|
||||
Result rc = sysclkIpcGetConfigValues(this->configList); // populate config list early otherwise wont work
|
||||
Result rc = hocclkIpcGetConfigValues(this->configList); // populate config list early otherwise wont work
|
||||
if (R_FAILED(rc)) [[unlikely]] {
|
||||
FatalGui::openWithResultCode("sysclkIpcGetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetConfigValues", rc);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1696,9 +1696,9 @@ void MiscGui::refresh() {
|
||||
if (this->context && ++frameCounter >= 60) {
|
||||
frameCounter = 0;
|
||||
|
||||
Result rc = sysclkIpcGetConfigValues(this->configList);
|
||||
Result rc = hocclkIpcGetConfigValues(this->configList);
|
||||
if (R_FAILED(rc)) [[unlikely]] {
|
||||
FatalGui::openWithResultCode("sysclkIpcGetConfigValues", rc);
|
||||
FatalGui::openWithResultCode("hocclkIpcGetConfigValues", rc);
|
||||
return;
|
||||
}
|
||||
updateConfigToggles();
|
||||
|
||||
@@ -33,17 +33,17 @@ public:
|
||||
void refresh() override;
|
||||
|
||||
protected:
|
||||
SysClkConfigValueList* configList;
|
||||
std::map<SysClkConfigValue, tsl::elm::ListItem*> configButtons;
|
||||
std::map<SysClkConfigValue, ValueRange> configRanges;
|
||||
std::map<SysClkConfigValue, std::vector<NamedValue>> configNamedValues;
|
||||
std::map<SysClkConfigValue, tsl::elm::ToggleListItem*> configToggles;
|
||||
std::map<SysClkConfigValue, std::tuple<tsl::elm::TrackBar*, tsl::elm::ListItem*, std::vector<uint64_t>>> configTrackbars;
|
||||
std::set<SysClkConfigValue> configButtonSKeys;
|
||||
std::map<SysClkConfigValue, std::string> configButtonSSubtext;
|
||||
HocClkConfigValueList* configList;
|
||||
std::map<HocClkConfigValue, tsl::elm::ListItem*> configButtons;
|
||||
std::map<HocClkConfigValue, ValueRange> configRanges;
|
||||
std::map<HocClkConfigValue, std::vector<NamedValue>> configNamedValues;
|
||||
std::map<HocClkConfigValue, tsl::elm::ToggleListItem*> configToggles;
|
||||
std::map<HocClkConfigValue, std::tuple<tsl::elm::TrackBar*, tsl::elm::ListItem*, std::vector<uint64_t>>> configTrackbars;
|
||||
std::set<HocClkConfigValue> configButtonSKeys;
|
||||
std::map<HocClkConfigValue, std::string> configButtonSSubtext;
|
||||
|
||||
void addConfigToggle(SysClkConfigValue configVal, const char* altName);
|
||||
void addConfigButton(SysClkConfigValue configVal,
|
||||
void addConfigToggle(HocClkConfigValue configVal, const char* altName);
|
||||
void addConfigButton(HocClkConfigValue configVal,
|
||||
const char* altName,
|
||||
const ValueRange& range,
|
||||
const std::string& categoryName,
|
||||
@@ -52,7 +52,7 @@ protected:
|
||||
const std::vector<NamedValue>& namedValues = {},
|
||||
bool showDefaultValue = true);
|
||||
|
||||
void addConfigButtonS(SysClkConfigValue configVal,
|
||||
void addConfigButtonS(HocClkConfigValue configVal,
|
||||
const char* altName,
|
||||
const ValueRange& range,
|
||||
const std::string& categoryName,
|
||||
@@ -61,9 +61,9 @@ protected:
|
||||
const std::vector<NamedValue>& namedValues = {},
|
||||
bool showDefaultValue = true,
|
||||
const char* subText = nullptr);
|
||||
void addFreqButton(SysClkConfigValue configVal,
|
||||
void addFreqButton(HocClkConfigValue configVal,
|
||||
const char* altName,
|
||||
SysClkModule module,
|
||||
HocClkModule module,
|
||||
const std::map<uint32_t, std::string>& labels = {});
|
||||
void updateConfigToggles();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user