mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
6a330a2894
* Fix bug causing RedrawRequested events to only get emitted every other iteration of the event loop. * Initialize simple_logger in examples. This PR's primary bug was discovered because a friend of mine reported that winit was emitting concerning log messages, which I'd never seen since none of the examples print out the log messages. This addresses that, to hopefully reduce the chance of bugs going unnoticed in the future. * Add changelog entry * Format
11 lines
312 B
Rust
11 lines
312 B
Rust
use winit::{event_loop::EventLoop, window::WindowBuilder};
|
|
|
|
fn main() {
|
|
simple_logger::init().unwrap();
|
|
let event_loop = EventLoop::new();
|
|
let window = WindowBuilder::new().build(&event_loop).unwrap();
|
|
|
|
dbg!(window.available_monitors().collect::<Vec<_>>());
|
|
dbg!(window.primary_monitor());
|
|
}
|