Fixing my mistakes

This commit is contained in:
Rokonio 2021-08-09 01:01:27 +02:00 committed by GitHub
parent 4ff3fbd19a
commit f0e150a190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,12 +74,10 @@ impl Display {
}) })
} }
pub fn resize(&mut self, new_size: winit::dpi::PhysicalSize<u32>) { pub fn resize(&mut self, width: u32, height: u32) {
self.size = new_size; self.sc_desc.width = width;
self.sc_desc.width = new_size.width; self.sc_desc.height = height;
self.sc_desc.height = new_size.height;
self.swap_chain = self.device.create_swap_chain(&self.surface, &self.sc_desc); self.swap_chain = self.device.create_swap_chain(&self.surface, &self.sc_desc);
}
} }
/** /**