From 213120a98b2df9127d093a9daf57b5d9d03fa562 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Tue, 26 Apr 2022 02:48:40 -0400 Subject: [PATCH] renderer_vulkan: Update screen info if the framebuffer size has changed --- src/video_core/renderer_vulkan/renderer_vulkan.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 7a1d911eb..7c78d0299 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -127,6 +127,11 @@ void RendererVulkan::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { if (!render_window.IsShown()) { return; } + // Update screen info if the framebuffer size has changed. + if (screen_info.width != framebuffer->width || screen_info.height != framebuffer->height) { + screen_info.width = framebuffer->width; + screen_info.height = framebuffer->height; + } const VAddr framebuffer_addr = framebuffer->address + framebuffer->offset; const bool use_accelerated = rasterizer.AccelerateDisplay(*framebuffer, framebuffer_addr, framebuffer->stride);