mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-11-04 06:00:23 +00:00
Don't update CPU freq/temp if not enabled
This commit is contained in:
parent
6bbc89a9cc
commit
9a7a4d99e0
@ -150,8 +150,6 @@ bool CPUStats::Init()
|
||||
//TODO take sampling interval into account?
|
||||
bool CPUStats::UpdateCPUData()
|
||||
{
|
||||
CPUStats::UpdateCoreMhz();
|
||||
CPUStats::UpdateCpuTemp();
|
||||
unsigned long long int usertime, nicetime, systemtime, idletime;
|
||||
unsigned long long int ioWait, irq, softIrq, steal, guest, guestnice;
|
||||
int cpuid = -1;
|
||||
|
@ -908,9 +908,15 @@ void update_hud_info(struct swapchain_stats& sw_stats, struct overlay_params& pa
|
||||
}
|
||||
if (sw_stats.last_fps_update) {
|
||||
if (elapsed >= params.fps_sampling_period) {
|
||||
|
||||
if (params.enabled[OVERLAY_PARAM_ENABLED_cpu_stats]) {
|
||||
cpuStats.UpdateCPUData();
|
||||
sw_stats.total_cpu = cpuStats.GetCPUDataTotal().percent;
|
||||
|
||||
if (params.enabled[OVERLAY_PARAM_ENABLED_core_load])
|
||||
cpuStats.UpdateCoreMhz();
|
||||
if (params.enabled[OVERLAY_PARAM_ENABLED_cpu_temp])
|
||||
cpuStats.UpdateCpuTemp();
|
||||
}
|
||||
|
||||
if (params.enabled[OVERLAY_PARAM_ENABLED_gpu_stats]) {
|
||||
|
Loading…
Reference in New Issue
Block a user