mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-10-31 15:20:13 +00:00
gpu_metrics: apu: set cpu temp as highest core temp
This commit is contained in:
parent
6983c2ec39
commit
986f3cc1b3
@ -1,5 +1,6 @@
|
||||
#include "amdgpu.h"
|
||||
#include "overlay.h"
|
||||
#include "cpu.h"
|
||||
|
||||
std::string metrics_path = "";
|
||||
|
||||
@ -32,6 +33,12 @@ void amdgpu_get_metrics()
|
||||
gpu_info.temp = amdgpu_metrics.temperature_gfx / 100;
|
||||
gpu_info.MemClock = amdgpu_metrics.current_uclk;
|
||||
gpu_info.apu_cpu_power = amdgpu_metrics.average_cpu_power;
|
||||
int cpu_temp = 0;
|
||||
for (int i = 0; i < cpuStats.GetCPUData().size() / 2; i++)
|
||||
if (amdgpu_metrics.temperature_core[i] > cpu_temp)
|
||||
cpu_temp = amdgpu_metrics.temperature_core[i];
|
||||
|
||||
gpu_info.apu_cpu_temp = cpu_temp / 100;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user