mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11:00
10419ff441
Fixes #1402.
23 lines
519 B
Rust
23 lines
519 B
Rust
#![allow(clippy::single_match)]
|
|
|
|
use simple_logger::SimpleLogger;
|
|
use winit::event_loop::EventLoop;
|
|
|
|
fn main() {
|
|
SimpleLogger::new().init().unwrap();
|
|
let event_loop = EventLoop::new();
|
|
let monitor = match event_loop.primary_monitor() {
|
|
Some(monitor) => monitor,
|
|
None => {
|
|
println!("No primary monitor detected.");
|
|
return;
|
|
}
|
|
};
|
|
|
|
println!("Listing available video modes:");
|
|
|
|
for mode in monitor.video_modes() {
|
|
println!("{}", mode);
|
|
}
|
|
}
|