From 80a5fdb1089512c4993be6db1a42eb670f332024 Mon Sep 17 00:00:00 2001 From: Jules Fouchy Date: Fri, 5 Apr 2024 19:07:39 +0200 Subject: [PATCH] Examples: GLFW+WebGPU: Fixed condition for when to recreate swapchain. (#7435, #7132) --- examples/example_emscripten_wgpu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example_emscripten_wgpu/main.cpp b/examples/example_emscripten_wgpu/main.cpp index ad6c3dd1c..d6ed58f03 100644 --- a/examples/example_emscripten_wgpu/main.cpp +++ b/examples/example_emscripten_wgpu/main.cpp @@ -184,7 +184,7 @@ int main(int, char**) // React to changes in screen size int width, height; glfwGetFramebufferSize((GLFWwindow*)window, &width, &height); - if (width != wgpu_swap_chain_width && height != wgpu_swap_chain_height) + if (width != wgpu_swap_chain_width || height != wgpu_swap_chain_height) { ImGui_ImplWGPU_InvalidateDeviceObjects(); CreateSwapChain(width, height);