2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #12688 from liamwhite/wl-present-fix

renderer_vulkan: recreate swapchain when frame size changes
This commit is contained in:
liamwhite 2024-01-20 13:36:18 -05:00 committed by GitHub
commit 444e86d191
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -329,7 +329,7 @@ void PresentManager::CopyToSwapchainImpl(Frame* frame) {
// to account for that. // to account for that.
const bool is_suboptimal = swapchain.NeedsRecreation(); const bool is_suboptimal = swapchain.NeedsRecreation();
const bool size_changed = const bool size_changed =
swapchain.GetWidth() < frame->width || swapchain.GetHeight() < frame->height; swapchain.GetWidth() != frame->width || swapchain.GetHeight() != frame->height;
if (is_suboptimal || size_changed) { if (is_suboptimal || size_changed) {
RecreateSwapchain(frame); RecreateSwapchain(frame);
} }