Skip to content

Commit

Permalink
Revert "Ignore the exception values generated by the winit resize eve…
Browse files Browse the repository at this point in the history
…nt" (#4195)
  • Loading branch information
jinleili authored Oct 2, 2023
1 parent 9ff61fe commit 6df7e2d
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions examples/common/src/framework.rs
Original file line number Diff line number Diff line change
@@ -309,22 +309,11 @@ fn start<E: Example>(
},
..
} => {
// 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 {

0 comments on commit 6df7e2d

Please sign in to comment.