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