Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesCJ60 committed Dec 17, 2023
1 parent e55b132 commit b7f8a32
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static async void UpdateiGPUClock(int maxClock, int minClock, int MaxTemp

if ((int)averageLastGpuLoad <= 40 && _gpuLoad > 60 && _currentClock < 650 && cpuClocks >= minCPUClock && memClock > 550) newClock = (int)(maxClock / 1.6);

if (fpsLimit > 0)
if (fps > 0 && fpsLimit > 0)
{
if (_gpuLoad > 92 && _temperature <= MaxTemperature && memClock >= 550 && cpuClocks > minCPUClock || fps < fpsLimit)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,15 @@ await Task.Run(() =>
else
{

if (RTSS.directoryRTSSExists() && RTSS.RTSSRunning() && AdViewModel.IsAdaptivePerf)
if (i > 6)
{
GPULoad = ADLXBackend.GetGPUMetrics(0, 7);
GPUClock = ADLXBackend.GetGPUMetrics(0, 0);
GPUMemClock = ADLXBackend.GetGPUMetrics(0, 1);
i = -1;
}

if (RTSS.directoryRTSSExists() == true && RTSS.RTSSRunning() == true && AdViewModel.IsAdaptivePerf == true)
{
bool exists = true;

Expand Down Expand Up @@ -1133,14 +1141,6 @@ await Task.Run(() =>
//exists = IsProcessRunning(appId);
});

if (i > 6)
{
GPULoad = ADLXBackend.GetGPUMetrics(0, 7);
GPUClock = ADLXBackend.GetGPUMetrics(0, 0);
GPUMemClock = ADLXBackend.GetGPUMetrics(0, 1);
i = -1;
}

if (CPUControl._currentPowerLimit >= 45) minCPUClock = 3600;
else if (CPUControl._currentPowerLimit >= 38) minCPUClock = 3200;
else if (CPUControl._currentPowerLimit >= 33) minCPUClock = 3000;
Expand Down Expand Up @@ -1172,20 +1172,20 @@ await Task.Run(() =>
{
CPUControl.UpdatePowerLimit(CPUTemp, CPULoad, AdViewModel.MaxTDP, minTDP, AdViewModel.MaxTemp);

if (iGPU) iGPUControl.UpdateiGPUClock(AdViewModel.MaxiGPU, AdViewModel.MiniGPU, AdViewModel.MaxTemp, CPUPower, CPUTemp, GPUClock, GPULoad, GPUMemClock, CPUClock, newMinCPUClock);
if (iGPU) iGPUControl.UpdateiGPUClock(AdViewModel.MaxiGPU, AdViewModel.MiniGPU, AdViewModel.MaxTemp, CPUPower, CPUTemp, GPUClock, GPULoad, GPUMemClock, CPUClock, newMinCPUClock, -1, -1);
}

updateAdaptive = false;
}
else updateAdaptive = true;
}
else
if(AdViewModel.IsAdaptivePerf == false)
{
if (updateAdaptive)
{
CPUControl.UpdatePowerLimit(CPUTemp, CPULoad, AdViewModel.MaxTDP, minTDP, AdViewModel.MaxTemp);

if (iGPU) iGPUControl.UpdateiGPUClock(AdViewModel.MaxiGPU, AdViewModel.MiniGPU, AdViewModel.MaxTemp, CPUPower, CPUTemp, GPUClock, GPULoad, GPUMemClock, CPUClock, newMinCPUClock);
if (iGPU) iGPUControl.UpdateiGPUClock(AdViewModel.MaxiGPU, AdViewModel.MiniGPU, AdViewModel.MaxTemp, CPUPower, CPUTemp, GPUClock, GPULoad, GPUMemClock, CPUClock, newMinCPUClock, -1, -1);

updateAdaptive = false;
}
Expand Down

0 comments on commit b7f8a32

Please sign in to comment.