From 1f362f49cdf5be9165262e10d4aa2fbdcf392ad1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tomas=20Wenstr=C3=B6m?= Date: Wed, 6 Jan 2021 13:58:50 +0100 Subject: [PATCH] Mark the current display modes --- src/game/app.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/game/app.rs b/src/game/app.rs index 3e11b5d..88f8e88 100644 --- a/src/game/app.rs +++ b/src/game/app.rs @@ -107,15 +107,18 @@ impl AppBuilder { " desktop_display_mode: {:?}", video.desktop_display_mode(display).unwrap() ); + let current = video.current_display_mode(display).unwrap(); println!( " current_display_mode: {:?}", - video.current_display_mode(display).unwrap() + current ); - for mode in 0..video.num_display_modes(display).unwrap() { + for idx in 0..video.num_display_modes(display).unwrap() { + let mode = video.display_mode(display, idx).unwrap(); println!( - " {:2}: {:?}", - mode, - video.display_mode(display, mode).unwrap() + " {}{:2}: {:?}", + if mode == current { "*" } else { " " }, + idx, + mode ); } } -- 2.11.0