mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
Fixed grabbing example.
This commit is contained in:
parent
11e27889ae
commit
d2ac6cfa11
|
@ -18,8 +18,8 @@ fn main() {
|
||||||
|
|
||||||
let context = support::load(&window);
|
let context = support::load(&window);
|
||||||
let mut grabbed = false;
|
let mut grabbed = false;
|
||||||
|
|
||||||
for event in window.poll_events() {
|
for event in window.wait_events() {
|
||||||
match event {
|
match event {
|
||||||
Event::KeyboardInput(ElementState::Pressed, _, _) => {
|
Event::KeyboardInput(ElementState::Pressed, _, _) => {
|
||||||
if grabbed {
|
if grabbed {
|
||||||
|
@ -33,6 +33,8 @@ fn main() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Event::Closed => break,
|
||||||
|
|
||||||
a @ Event::MouseMoved(_) => {
|
a @ Event::MouseMoved(_) => {
|
||||||
println!("{:?}", a);
|
println!("{:?}", a);
|
||||||
},
|
},
|
||||||
|
@ -44,4 +46,3 @@ fn main() {
|
||||||
let _ = window.swap_buffers();
|
let _ = window.swap_buffers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue