From 6df7e2d7e5f8a96d45c93ab425fba813498ea2bc Mon Sep 17 00:00:00 2001 From: Jinlei Li Date: Mon, 2 Oct 2023 20:42:06 +0800 Subject: [PATCH] Revert "Ignore the exception values generated by the winit resize event" (#4195) --- examples/common/src/framework.rs | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/examples/common/src/framework.rs b/examples/common/src/framework.rs index 875d8544e..dc373ca87 100644 --- a/examples/common/src/framework.rs +++ b/examples/common/src/framework.rs @@ -309,22 +309,11 @@ fn start( }, .. } => { - // Once winit is fixed, the detection conditions here can be removed. - // https://github.com/rust-windowing/winit/issues/2876 - let max_dimension = adapter.limits().max_texture_dimension_2d; - if size.width > max_dimension || size.height > max_dimension { - log::warn!( - "The resizing size {:?} exceeds the limit of {}.", - size, - max_dimension - ); - } else { - log::info!("Resizing to {:?}", size); - config.width = size.width.max(1); - config.height = size.height.max(1); - example.resize(&config, &device, &queue); - surface.configure(&device, &config); - } + log::info!("Resizing to {:?}", size); + config.width = size.width.max(1); + config.height = size.height.max(1); + example.resize(&config, &device, &queue); + surface.configure(&device, &config); } event::Event::WindowEvent { event, .. } => match event { WindowEvent::KeyboardInput {