2022-06-10 20:43:33 +10:00
|
|
|
#![allow(clippy::single_match)]
|
|
|
|
|
2020-09-10 11:58:30 +10:00
|
|
|
use simple_logger::SimpleLogger;
|
2019-06-13 04:07:25 +10:00
|
|
|
use winit::event_loop::EventLoop;
|
|
|
|
|
|
|
|
fn main() {
|
2020-09-10 11:58:30 +10:00
|
|
|
SimpleLogger::new().init().unwrap();
|
2019-06-13 04:07:25 +10:00
|
|
|
let event_loop = EventLoop::new();
|
2020-09-08 03:20:47 +10:00
|
|
|
let monitor = match event_loop.primary_monitor() {
|
|
|
|
Some(monitor) => monitor,
|
|
|
|
None => {
|
|
|
|
println!("No primary monitor detected.");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
};
|
2019-06-13 04:07:25 +10:00
|
|
|
|
|
|
|
println!("Listing available video modes:");
|
|
|
|
|
|
|
|
for mode in monitor.video_modes() {
|
2023-01-27 15:18:58 +11:00
|
|
|
println!("{mode}");
|
2019-06-13 04:07:25 +10:00
|
|
|
}
|
|
|
|
}
|