Browse Source

Examples: GLFW+WebGPU: Fixed condition for when to recreate swapchain. (#7435, #7132)

Jules Fouchy 1 year ago
parent
commit
80a5fdb108
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/example_emscripten_wgpu/main.cpp

+ 1 - 1
examples/example_emscripten_wgpu/main.cpp

@@ -184,7 +184,7 @@ int main(int, char**)
         // React to changes in screen size
         // React to changes in screen size
         int width, height;
         int width, height;
         glfwGetFramebufferSize((GLFWwindow*)window, &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();
             ImGui_ImplWGPU_InvalidateDeviceObjects();
             CreateSwapChain(width, height);
             CreateSwapChain(width, height);