sysclk: minor changes

This commit is contained in:
souldbminersmwc committed 2026-01-18 16:26:30 -05:00
1 parent ccb446b1ab
commit b51b8dbbcd
6 files changed
+10 -9

No files matched your search

+2 -2
View File
@@ -426,14 +426,14 @@ void Board::SetHz(SysClkModule module, std::uint32_t hz)
DisplayRefresh_SetRate(hz);
return;
}
if(module > SysClkModule_MEM)
return;
if(HOSSVC_HAS_CLKRST)
{
ClkrstSession session = {0};
rc = clkrstOpenSession(&session, Board::GetPcvModuleId(module), 3);
ASSERT_RESULT_OK(rc, "clkrstOpenSession");
rc = clkrstSetClockRate(&session, hz);
ASSERT_RESULT_OK(rc, "clkrstSetClockRate");
@@ -694,7 +694,7 @@ bool ClockManager::RefreshContext()
targetHz = this->config->GetAutoClockHz(GLOBAL_PROFILE_ID, HorizonOCModule_Display, this->context->profile, true);
}
if(targetHz && this->context->realFreqs[HorizonOCModule_Display] != targetHz)
if(targetHz && this->context->realFreqs[HorizonOCModule_Display] > targetHz)
this->context->realFreqs[HorizonOCModule_Display] = targetHz; // clean up display real freqs, should probably be moved to the real freqs loop?
+2 -2
View File
@@ -28,14 +28,14 @@
#include "errors.h"
#include <cstdarg>
#include <cstring>
#include "file_utils.h"
void Errors::ThrowException(const char* format, ...)
{
va_list args;
va_start(args, format);
const char* msg = Errors::FormatMessage(format, args);
va_end(args);
FileUtils::LogLine(format, args);
throw std::runtime_error(msg);
}