diff --git a/Source/sys-clk/common/include/sysclk/clock_manager.h b/Source/sys-clk/common/include/sysclk/clock_manager.h index 5e305342..362b6a85 100644 --- a/Source/sys-clk/common/include/sysclk/clock_manager.h +++ b/Source/sys-clk/common/include/sysclk/clock_manager.h @@ -43,10 +43,12 @@ typedef struct uint32_t voltages[HocClkVoltage_EnumMax]; u16 speedos[HorizonOCSpeedo_EnumMax]; u16 iddq[HorizonOCSpeedo_EnumMax]; + GpuSchedulingMode gpuSchedulingMode; + bool isSysDockInstalled; u8 maxDisplayFreq; - u8 fps; u8 dramID; bool isDram8GB; + u8 fps; } SysClkContext; typedef struct diff --git a/Source/sys-clk/common/src/display_refresh_rate.cpp b/Source/sys-clk/common/src/display_refresh_rate.cpp index 57a981ca..1dc8ca21 100644 --- a/Source/sys-clk/common/src/display_refresh_rate.cpp +++ b/Source/sys-clk/common/src/display_refresh_rate.cpp @@ -42,9 +42,9 @@ static bool g_canChangeRefreshRateDocked = false; static uint8_t g_lastVActiveSet = 0; // Refresh rate tables -static const uint8_t g_dockedRefreshRates[] = {40, 45, 50, 55, 60, 70, 72, 75, 80, 90, 95, 100, 110, 120}; -static bool g_dockedAllowed[14] = {0}; -static bool g_dockedAllowed720p[14] = {0}; +static const uint8_t g_dockedRefreshRates[] = {40, 45, 50, 55, 60, 70, 72, 75, 80, 90, 95, 100, 110, 120, 130, 144, 150, 160, 165, 170, 180, 190, 200, 210, 220, 230, 240}; +static bool g_dockedAllowed[sizeof(g_dockedRefreshRates) / sizeof(g_dockedRefreshRates[0])] = {0}; +static bool g_dockedAllowed720p[sizeof(g_dockedRefreshRates) / sizeof(g_dockedRefreshRates[0])] = {0}; static const DockedTimings g_dockedTimings1080p[] = { {8, 32, 40, 7, 8, 6, 0, 88080}, // 40Hz diff --git a/Source/sys-clk/overlay/src/ui/gui/about_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/about_gui.cpp index 3fcb84bc..ae566cd4 100644 --- a/Source/sys-clk/overlay/src/ui/gui/about_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/about_gui.cpp @@ -24,6 +24,7 @@ tsl::elm::ListItem* SpeedoItem = NULL; tsl::elm::ListItem* IddqItem = NULL; +tsl::elm::ListItem* sysdockStatusItem = NULL; ImageElement* CatImage = NULL; HideableCategoryHeader* CatHeader = NULL; HideableCustomDrawer* CatSpacer = NULL; @@ -41,17 +42,21 @@ AboutGui::~AboutGui() void AboutGui::listUI() { this->listElement->addItem( - new tsl::elm::CategoryHeader("Speedo/IDDQ") + new tsl::elm::CategoryHeader("Information") ); SpeedoItem = - new tsl::elm::ListItem("Speedos:"); + new tsl::elm::ListItem("Speedo:"); this->listElement->addItem(SpeedoItem); IddqItem = new tsl::elm::ListItem("IDDQ:"); this->listElement->addItem(IddqItem); + sysdockStatusItem = + new tsl::elm::ListItem("sys-dock status:"); + this->listElement->addItem(sysdockStatusItem); + this->listElement->addItem( new tsl::elm::CategoryHeader("Credits") ); @@ -221,4 +226,5 @@ void AboutGui::refresh() sprintf(strings[1], "%u/%u/%u", this->context->iddq[HorizonOCSpeedo_CPU], this->context->iddq[HorizonOCSpeedo_GPU], this->context->iddq[HorizonOCSpeedo_SOC]); SpeedoItem->setValue(strings[0]); IddqItem->setValue(strings[1]); + sysdockStatusItem->setValue(this->context->isSysDockInstalled ? "Installed" : "Not Installed"); } \ No newline at end of file diff --git a/Source/sys-clk/overlay/src/ui/gui/app_profile_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/app_profile_gui.cpp index 0582b802..9594a060 100644 --- a/Source/sys-clk/overlay/src/ui/gui/app_profile_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/app_profile_gui.cpp @@ -275,7 +275,10 @@ void AppProfileGui::addModuleListItemValue( } void AppProfileGui::addProfileUI(SysClkProfile profile) -{ +{ + BaseMenuGui::refresh(); + if(!this->context) + return; Result rc = sysclkIpcGetConfigValues(&configList); // idk why this is needed, probably some refreshing issue if (R_FAILED(rc)) [[unlikely]] { FatalGui::openWithResultCode("sysclkIpcGetConfigValues", rc); @@ -291,7 +294,7 @@ void AppProfileGui::addProfileUI(SysClkProfile profile) if(profile != SysClkProfile_Docked) this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", IsAula() ? 45 : 40, configList.values[HorizonOCConfigValue_EnableUnsafeDisplayFreqs] ? IsAula() ? 65 : 72 : 60, 1, " Hz", 1, 0, lcdThresholds); else - this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 50, 120, 5, " Hz", 1, 0); + this->addModuleListItemValue(profile, HorizonOCModule_Display, "Display", 50, IsAula() ? this->context->isSysDockInstalled ? 120 : 75 : 120, 5, " Hz", 1, 0); } #endif this->addModuleListItemToggle(profile, HorizonOCModule_Governor); diff --git a/Source/sys-clk/sysmodule/src/clock_manager.cpp b/Source/sys-clk/sysmodule/src/clock_manager.cpp index b4a60783..7d387428 100644 --- a/Source/sys-clk/sysmodule/src/clock_manager.cpp +++ b/Source/sys-clk/sysmodule/src/clock_manager.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #define HOSPPC_HAS_BOOST (hosversionAtLeast(7,0,0)) bool isGovernorEnabled = false; // to avoid thread messes @@ -113,6 +114,14 @@ ClockManager::ClockManager() this->context->isDram8GB = Board::IsDram8GB(); previousRamHz = Board::GetHz(SysClkModule_MEM); Board::SetGpuSchedulingMode((GpuSchedulingMode)this->config->GetConfigValue(HorizonOCConfigValue_GPUScheduling)); + this->context->gpuSchedulingMode = (GpuSchedulingMode)this->config->GetConfigValue(HorizonOCConfigValue_GPUScheduling); + + struct stat st = {0}; + if (stat("sdmc:/atmosphere/contents/42000000000000A0", &st) == 0 && S_ISDIR(st.st_mode)) { + this->context->isSysDockInstalled = true; + } else { + this->context->isSysDockInstalled = false; + } } ClockManager::~ClockManager()