diff --git a/examples/framework.rs b/examples/framework.rs index 07bd3d5aa..9f574d6e5 100644 --- a/examples/framework.rs +++ b/examples/framework.rs @@ -250,8 +250,8 @@ fn start( .. } => { log::info!("Resizing to {:?}", size); - sc_desc.width = size.width; - sc_desc.height = size.height; + sc_desc.width = if size.width == 0 { 1 } else { size.width }; + sc_desc.height = if size.height == 0 { 1 } else { size.height }; example.resize(&sc_desc, &device, &queue); swap_chain = device.create_swap_chain(&surface, &sc_desc); } diff --git a/examples/water/main.rs b/examples/water/main.rs index a3fcbc7ba..8b57f050a 100644 --- a/examples/water/main.rs +++ b/examples/water/main.rs @@ -648,13 +648,8 @@ impl framework::Example for Example { // Stop rendering altogether. self.active = None; return; - } else { - // The next frame queued is the wrong size: (0, 0), - // so we skip a frame to avoid crashes where our - // textures are the correct (window) size, and the - // frame is still (0, 0). - self.active = Some(self.current_frame + 1); } + self.active = Some(self.current_frame); // Regenerate all of the buffers and textures.