From cc301493ca59e97dc89d8516b65f8b8f141b8bd7 Mon Sep 17 00:00:00 2001 From: Dustin Taylor Date: Tue, 20 Sep 2022 14:02:29 -0400 Subject: [PATCH] mach: 0 size swapchain noop fix --- src/platform/native.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/native.zig b/src/platform/native.zig index 1b5375db..9300fe17 100644 --- a/src/platform/native.zig +++ b/src/platform/native.zig @@ -626,7 +626,7 @@ pub fn coreUpdate(core: *Core, resize: ?CoreResizeCallback) !void { core.target_desc.width = framebuffer_size.width; core.target_desc.height = framebuffer_size.height; - if (core.swap_chain == null or !std.meta.eql(core.current_desc, core.target_desc)) { + if ((core.swap_chain == null or !std.meta.eql(core.current_desc, core.target_desc)) and !(core.target_desc.width == 0 or core.target_desc.height == 0)) { core.swap_chain = core.device.createSwapChain(core.surface, &core.target_desc); if (@hasDecl(App, "resize")) {