Skip to content

Commit 6b1062b

Browse files
committed
修正标准版在关闭硬件监控时无法使用pdh获取的硬盘利用率的问题
1 parent 019b069 commit 6b1062b

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

TrafficMonitor/TrafficMonitorDlg.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,6 +1357,13 @@ void CTrafficMonitorDlg::DoMonitorAcquisition()
13571357
bool gpu_usage_acquired = false;
13581358
m_get_disk_usage_by_pdh = false;
13591359

1360+
theApp.m_cpu_temperature = -1;
1361+
theApp.m_gpu_temperature = -1;
1362+
theApp.m_hdd_temperature = -1;
1363+
theApp.m_main_board_temperature = -1;
1364+
theApp.m_gpu_usage = -1;
1365+
theApp.m_hdd_usage = -1;
1366+
13601367
//获取CPU使用率
13611368
if (lite_version || theApp.m_general_data.cpu_usage_acquire_method != GeneralSettingData::CA_HARDWARE_MONITOR || !theApp.m_general_data.IsHardwareEnable(HI_CPU))
13621369
{
@@ -1499,15 +1506,6 @@ void CTrafficMonitorDlg::DoMonitorAcquisition()
14991506
}
15001507
}
15011508
}
1502-
else
1503-
{
1504-
theApp.m_cpu_temperature = -1;
1505-
theApp.m_gpu_temperature = -1;
1506-
theApp.m_hdd_temperature = -1;
1507-
theApp.m_main_board_temperature = -1;
1508-
theApp.m_gpu_usage = -1;
1509-
theApp.m_hdd_usage = -1;
1510-
}
15111509
#endif
15121510

15131511
//通知插件获取数据,以及向插件传递监控数据

0 commit comments

Comments
 (0)