mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-29 09:34:09 +01:00
[rs] Switch event loop back to ControlFlow::Poll
This commit is contained in:
1 parent
c4be28fcd9
commit
c3c5d3927a
2 files changed
+2
-4
No files matched your search
@@ -94,8 +94,7 @@ async fn run_async<E: Example>(event_loop: EventLoop<()>, window: Window) {
|
||||
*control_flow = if cfg!(feature = "metal-auto-capture") {
|
||||
ControlFlow::Exit
|
||||
} else {
|
||||
// TODO: ControlFlow::Poll
|
||||
ControlFlow::Wait
|
||||
ControlFlow::Poll
|
||||
};
|
||||
match event {
|
||||
event::Event::MainEventsCleared => window.request_redraw(),
|
||||
|
||||
@@ -93,8 +93,7 @@ async fn run(event_loop: EventLoop<()>, window: Window) {
|
||||
let mut swap_chain = device.create_swap_chain(&surface, &sc_desc);
|
||||
|
||||
event_loop.run(move |event, _, control_flow| {
|
||||
// TODO: ControlFlow::Poll;
|
||||
*control_flow = ControlFlow::Wait;
|
||||
*control_flow = ControlFlow::Poll;
|
||||
match event {
|
||||
Event::MainEventsCleared => window.request_redraw(),
|
||||
Event::WindowEvent {
|
||||
|
||||
Reference in new issue
Block a user