Skip to content

Commit

Permalink
Try #2300:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Jun 9, 2021
2 parents e549f14 + ff52ee5 commit 80f5b1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ impl Node for WindowTextureNode {
render_resource_context.remove_texture(old_texture);
}

self.descriptor.size.width = window.physical_width();
self.descriptor.size.height = window.physical_height();
self.descriptor.size.width = window.physical_width().max(1);
self.descriptor.size.height = window.physical_height().max(1);
let texture_resource = render_resource_context.create_texture(self.descriptor);
output.set(WINDOW_TEXTURE, RenderResourceId::Texture(texture_resource));
}
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_wgpu/src/wgpu_type_converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,8 @@ impl WgpuFrom<&Window> for wgpu::SwapChainDescriptor {
wgpu::SwapChainDescriptor {
usage: wgpu::TextureUsage::RENDER_ATTACHMENT,
format: TextureFormat::default().wgpu_into(),
width: window.physical_width(),
height: window.physical_height(),
width: window.physical_width().max(1),
height: window.physical_height().max(1),
present_mode: if window.vsync() {
wgpu::PresentMode::Fifo
} else {
Expand Down

0 comments on commit 80f5b1b

Please sign in to comment.