From 71ce596e6c8f3c6c2311c3c37dc0a3f2e4c3afa8 Mon Sep 17 00:00:00 2001 From: Cherry <13651622+MolotovCherry@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:32:48 -0800 Subject: [PATCH] Clearer duplicate warning messages --- virtual-display-driver/src/ipc.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/virtual-display-driver/src/ipc.rs b/virtual-display-driver/src/ipc.rs index a420b1c3..f7b8da16 100644 --- a/virtual-display-driver/src/ipc.rs +++ b/virtual-display-driver/src/ipc.rs @@ -168,14 +168,20 @@ fn has_duplicates(monitors: &[Monitor]) -> bool { .iter() .any(|m| mode.height == m.height && mode.width == m.width); if duplicate_mode { - warn!("Found duplicate mode {}x{}", mode.width, mode.height); + warn!( + "Found duplicate mode {}x{} on monitor {}", + mode.width, mode.height, monitor.id + ); return true; } for (k, rr) in mode.refresh_rates.iter().copied().enumerate() { let duplicate_rr = mode.refresh_rates[k + 1..].iter().any(|&r| rr == r); if duplicate_rr { - warn!("Found duplicate refresh rate {rr}"); + warn!( + "Found duplicate refresh rate {rr} on mode {}x{} for monitor {}", + mode.width, mode.height, monitor.id + ); return true; } }