Skip to content

Commit

Permalink
Examples: GLFW+WebGPU: Fixed condition for when to recreate swapchain. (
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy authored and ocornut committed Apr 16, 2024
1 parent f9df6bf commit 80a5fdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/example_emscripten_wgpu/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 80a5fdb

Please sign in to comment.