File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1376,9 +1376,9 @@ void CTrafficMonitorDlg::DoMonitorAcquisition()
13761376 {
13771377 if (m_gpu_usage_helper.GetGpuUsage (theApp.m_gpu_usage ))
13781378 gpu_usage_acquired = true ;
1379+ else
1380+ theApp.m_gpu_usage = -1 ;
13791381 }
1380- if (!gpu_usage_acquired)
1381- theApp.m_gpu_usage = -1 ;
13821382
13831383 // 获取硬盘利用率
13841384 if (lite_version /* || is_arm64ec*/ || !theApp.m_general_data .IsHardwareEnable (HI_HDD))
@@ -1405,9 +1405,9 @@ void CTrafficMonitorDlg::DoMonitorAcquisition()
14051405 }
14061406 if (m_disk_usage_helper.GetDiskUsage (disk_index, theApp.m_hdd_usage ))
14071407 m_get_disk_usage_by_pdh = true ;
1408+ else
1409+ theApp.m_hdd_usage = -1 ;
14081410 }
1409- if (!m_get_disk_usage_by_pdh)
1410- theApp.m_hdd_usage = -1 ;
14111411
14121412 // 获取内存利用率
14131413 MEMORYSTATUSEX statex;
@@ -1418,10 +1418,6 @@ void CTrafficMonitorDlg::DoMonitorAcquisition()
14181418 theApp.m_total_memory = static_cast <int >(statex.ullTotalPhys / 1024 );
14191419
14201420#ifndef WITHOUT_TEMPERATURE
1421- theApp.m_cpu_temperature = -1 ;
1422- theApp.m_gpu_temperature = -1 ;
1423- theApp.m_hdd_temperature = -1 ;
1424- theApp.m_main_board_temperature = -1 ;
14251421 // 获取温度
14261422 if (IsTemperatureNeeded () && theApp.m_pMonitor != nullptr )
14271423 {
You can’t perform that action at this time.
0 commit comments