mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 23:04:07 +00:00
[rs] Schedule event waits after redraw events are cleared
This commit is contained in:
parent
0542ad585a
commit
070688a84d
@ -221,7 +221,7 @@ fn start<E: Example>(
|
||||
ControlFlow::Poll
|
||||
};
|
||||
match event {
|
||||
event::Event::MainEventsCleared => {
|
||||
event::Event::RedrawEventsCleared => {
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
{
|
||||
// Clamp to some max framerate to avoid busy-looping too much
|
||||
|
@ -80,7 +80,7 @@ async fn run(event_loop: EventLoop<()>, window: Window) {
|
||||
// the resources are properly cleaned up.
|
||||
let _ = (&instance, &adapter, &shader, &pipeline_layout);
|
||||
|
||||
*control_flow = ControlFlow::Poll;
|
||||
*control_flow = ControlFlow::Wait;
|
||||
match event {
|
||||
Event::WindowEvent {
|
||||
event: WindowEvent::Resized(size),
|
||||
|
Loading…
Reference in New Issue
Block a user