From: Tomas Wenström Date: Wed, 6 Jan 2021 12:58:50 +0000 (+0100) Subject: Mark the current display modes X-Git-Url: http://dolda2000.com/gitweb/?p=kaka%2Frust-sdl-test.git;a=commitdiff_plain;h=1f362f49cdf5be9165262e10d4aa2fbdcf392ad1 Mark the current display modes --- 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 ); } }