Fix resize detection

This commit is contained in:
Maximilian Ammann 2022-06-01 12:30:09 +02:00
parent 005dca064e
commit cfba8189c3
2 changed files with 3 additions and 3 deletions

View File

@ -159,6 +159,6 @@ fn main() {
#[cfg(feature = "trace")]
enable_tracing();
run_headless();
//run_headless();
run_in_window();
}

View File

@ -207,7 +207,7 @@ impl Surface {
let frame = match surface.get_current_texture() {
Ok(view) => view,
Err(wgpu::SurfaceError::Outdated) => {
tracing::trace!("surface outdated");
log::warn!("surface outdated");
window.configure(device);
surface
.get_current_texture()
@ -278,6 +278,6 @@ impl HasChanged for WindowHead {
type Criteria = (u32, u32);
fn has_changed(&self, criteria: &Self::Criteria) -> bool {
self.surface_config.height != criteria.0 || self.surface_config.width != criteria.1
self.surface_config.width != criteria.0 || self.surface_config.height != criteria.1
}
}