winit-sonoma-fix/examples/video_modes.rs
Aleksi Juvani 47b5dfa034 Support listing available video modes for a monitor (#896)
* Support listing available video modes for a monitor

* Use derivative for Windows `MonitorHandle`

* Update FEATURES.md

* Fix multiline if statement

* Add documentation for `VideoMode` type
2019-06-12 14:07:25 -04:00

15 lines
285 B
Rust

extern crate winit;
use winit::event_loop::EventLoop;
fn main() {
let event_loop = EventLoop::new();
let monitor = event_loop.primary_monitor();
println!("Listing available video modes:");
for mode in monitor.video_modes() {
println!("{:?}", mode);
}
}