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() {
|
2019-07-30 04:16:14 +10:00
|
|
|
println!("{}", mode);
|
2019-06-13 04:07:25 +10:00
|
|
|
}
|
|
|
|
}
|