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

This commit is contained in:
Jules Fouchy 2024-04-05 19:07:39 +02:00 committed by ocornut
parent f9df6bf662
commit 80a5fdb108

View File

@ -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);