diff options
-rw-r--r-- | winit/src/system.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/winit/src/system.rs b/winit/src/system.rs index 361135be..0b476773 100644 --- a/winit/src/system.rs +++ b/winit/src/system.rs @@ -17,7 +17,11 @@ pub(crate) fn information( let mut system = System::new_all(); system.refresh_all(); - let cpu = system.global_cpu_info(); + let cpu_brand = system + .cpus() + .first() + .map(|cpu| cpu.brand().to_string()) + .unwrap_or_default(); let memory_used = sysinfo::get_current_pid() .and_then(|pid| system.process(pid).ok_or("Process not found")) @@ -29,7 +33,7 @@ pub(crate) fn information( system_kernel: System::kernel_version(), system_version: System::long_os_version(), system_short_version: System::os_version(), - cpu_brand: cpu.brand().into(), + cpu_brand, cpu_cores: system.physical_core_count(), memory_total: system.total_memory(), memory_used, |