anvil: Fix winit resizing
@@ -168,7 +168,14 @@ pub fn run_winit(log: Logger) {
.and_then(|_| {
backend
.renderer()
- .render(size, Transform::Flipped180, |renderer, frame| {
+ .render(
+ output_geometry
+ .size
+ .to_f64()
+ .to_physical(output_scale as f64)
+ .to_i32_round(),
+ Transform::Flipped180,
+ |renderer, frame| {
render_layers_and_windows(
renderer,
frame,
@@ -238,7 +245,8 @@ pub fn run_winit(log: Logger) {
}
Ok(())
- })
+ },
+ )
.map_err(Into::<SwapBuffersError>::into)
.and_then(|x| x)
})
