sysclk: fix logic errors
This commit is contained in:
@@ -27,6 +27,7 @@ tsl::elm::ListItem* IddqItem = NULL;
|
|||||||
tsl::elm::ListItem* DramModule = NULL;
|
tsl::elm::ListItem* DramModule = NULL;
|
||||||
tsl::elm::ListItem* sysdockStatusItem = NULL;
|
tsl::elm::ListItem* sysdockStatusItem = NULL;
|
||||||
tsl::elm::ListItem* saltyNXStatusItem = NULL;
|
tsl::elm::ListItem* saltyNXStatusItem = NULL;
|
||||||
|
tsl::elm::ListItem* RETROStatusItem = NULL;
|
||||||
|
|
||||||
ImageElement* CatImage = NULL;
|
ImageElement* CatImage = NULL;
|
||||||
HideableCategoryHeader* CatHeader = NULL;
|
HideableCategoryHeader* CatHeader = NULL;
|
||||||
@@ -67,6 +68,12 @@ void AboutGui::listUI()
|
|||||||
saltyNXStatusItem =
|
saltyNXStatusItem =
|
||||||
new tsl::elm::ListItem("SaltyNX status:");
|
new tsl::elm::ListItem("SaltyNX status:");
|
||||||
this->listElement->addItem(saltyNXStatusItem);
|
this->listElement->addItem(saltyNXStatusItem);
|
||||||
|
|
||||||
|
if(IsHoag()) {
|
||||||
|
RETROStatusItem =
|
||||||
|
new tsl::elm::ListItem("RR Display status:");
|
||||||
|
this->listElement->addItem(RETROStatusItem);
|
||||||
|
}
|
||||||
|
|
||||||
this->listElement->addItem(
|
this->listElement->addItem(
|
||||||
new tsl::elm::CategoryHeader("Credits")
|
new tsl::elm::CategoryHeader("Credits")
|
||||||
@@ -284,4 +291,6 @@ void AboutGui::refresh()
|
|||||||
DramModule->setValue(formatRamModule());
|
DramModule->setValue(formatRamModule());
|
||||||
sysdockStatusItem->setValue(this->context->isSysDockInstalled ? "Installed" : "Not Installed");
|
sysdockStatusItem->setValue(this->context->isSysDockInstalled ? "Installed" : "Not Installed");
|
||||||
saltyNXStatusItem->setValue(this->context->isSaltyNXInstalled ? "Installed" : "Not Installed");
|
saltyNXStatusItem->setValue(this->context->isSaltyNXInstalled ? "Installed" : "Not Installed");
|
||||||
|
if(IsHoag())
|
||||||
|
RETROStatusItem->setValue(this->context->isUsingRetroSuper ? "Installed" : "Not Installed");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
class AboutGui : public BaseMenuGui
|
class AboutGui : public BaseMenuGui
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
char strings[32][32]; // Pre-formatted strings
|
char strings[32][32];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AboutGui();
|
AboutGui();
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ public:
|
|||||||
static constexpr struct { const char* label; int shift; } kAll[] = {
|
static constexpr struct { const char* label; int shift; } kAll[] = {
|
||||||
{"CPU", 0}, {"GPU", 8}, {"VRR", 16}
|
{"CPU", 0}, {"GPU", 8}, {"VRR", 16}
|
||||||
};
|
};
|
||||||
int count = configList.values[HorizonOCConfigValue_OverwriteRefreshRate] ? 2 : 3;
|
int count = configList.values[HorizonOCConfigValue_OverwriteRefreshRate] ? 3 : 2;
|
||||||
|
|
||||||
for (int i = 0; i < count; i++) {
|
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][HorizonOCModule_Governor] >> kAll[i].shift) & 0xFF;
|
||||||
@@ -416,8 +416,7 @@ void AppProfileGui::addProfileUI(SysClkProfile profile)
|
|||||||
NamedValue("115 Hz", 115),
|
NamedValue("115 Hz", 115),
|
||||||
NamedValue("120 Hz", 120)
|
NamedValue("120 Hz", 120)
|
||||||
};
|
};
|
||||||
if(configList.values[HorizonOCConfigValue_OverwriteRefreshRate])
|
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 50, 120, 1, " Hz", 1, 0, ValueThresholds(), dockedFreqsStandard);
|
||||||
this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 50, 120, 1, " Hz", 1, 0, ValueThresholds(), dockedFreqsStandard);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -299,12 +299,17 @@ public:
|
|||||||
GovernorOverrideSubMenuGui(u32 initialPacked) : packed(initialPacked) {}
|
GovernorOverrideSubMenuGui(u32 initialPacked) : packed(initialPacked) {}
|
||||||
|
|
||||||
void listUI() override {
|
void listUI() override {
|
||||||
|
Result rc = sysclkIpcGetConfigValues(&configList); // idk why this is needed, probably some refreshing issue
|
||||||
|
if (R_FAILED(rc)) [[unlikely]] {
|
||||||
|
FatalGui::openWithResultCode("sysclkIpcGetConfigValues", rc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
this->listElement->addItem(new tsl::elm::CategoryHeader("Governor"));
|
this->listElement->addItem(new tsl::elm::CategoryHeader("Governor"));
|
||||||
|
|
||||||
static constexpr struct { const char* label; int shift; } kAll[] = {
|
static constexpr struct { const char* label; int shift; } kAll[] = {
|
||||||
{"CPU", 0}, {"GPU", 8}, {"VRR", 16}
|
{"CPU", 0}, {"GPU", 8}, {"VRR", 16}
|
||||||
};
|
};
|
||||||
int count = configList.values[HorizonOCConfigValue_OverwriteRefreshRate] ? 2 : 3;
|
int count = configList.values[HorizonOCConfigValue_OverwriteRefreshRate] ? 3 : 2;
|
||||||
|
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
u8 cur = (this->packed >> kAll[i].shift) & 0xFF;
|
u8 cur = (this->packed >> kAll[i].shift) & 0xFF;
|
||||||
|
|||||||
@@ -776,11 +776,9 @@ void ClockManager::SetClocks(bool isBoost) {
|
|||||||
if(noDisp && module == HorizonOCModule_Display)
|
if(noDisp && module == HorizonOCModule_Display)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(module == HorizonOCModule_Display && this->config->GetConfigValue(HorizonOCConfigValue_OverwriteRefreshRate)) {
|
if(module == HorizonOCModule_Display && this->config->GetConfigValue(HorizonOCConfigValue_OverwriteRefreshRate) && !noDisp) {
|
||||||
if(targetHz)
|
if(targetHz)
|
||||||
Board::SetHz(HorizonOCModule_Display, targetHz);
|
Board::SetHz(HorizonOCModule_Display, targetHz);
|
||||||
else
|
|
||||||
Board::ResetToStockDisplay();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip GPU and CPU if governors handle them
|
// Skip GPU and CPU if governors handle them
|
||||||
|
|||||||
Reference in New Issue
Block a user