From ac3f6a06fbf296e117e86e3f5b71e764fab1ce98 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 27 Jun 2022 04:25:18 +0800 Subject: [PATCH] fix status bar (ran out of precision during the floating pt refactoring) --- services/status/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/status/src/main.rs b/services/status/src/main.rs index 433f3cf6a..966754248 100644 --- a/services/status/src/main.rs +++ b/services/status/src/main.rs @@ -530,7 +530,7 @@ fn wrapped_main() -> ! { let (latest_activity, period) = llio .activity_instantaneous() .expect("couldn't get CPU activity"); - let activity_to_width = (((latest_activity * 1000) / (period)) * (cpuload_rect.width() - 4) as u32) / 1000; + let activity_to_width = ((latest_activity as u64) * 1000u64 * (cpuload_rect.width() as u64 - 4)) / (period as u64 * 1000u64); draw_list.push(GamObjectType::Rect( Rectangle::new_coords_with_style( cpuload_rect.tl().x + 2,