summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-04-28 07:21:15 +0200
committerGitHub <noreply@github.com>2022-04-28 07:21:15 +0200
commitf3128fe915219a3564be366d3ab0c317422f0fc5 (patch)
tree8293fb275aabb8a214140ed13583aef130c54d37
parentMerge pull request #8236 from Docteh/sort_translations (diff)
parentrenderer_vulkan: Update screen info if the framebuffer size has changed (diff)
downloadyuzu-f3128fe915219a3564be366d3ab0c317422f0fc5.tar
yuzu-f3128fe915219a3564be366d3ab0c317422f0fc5.tar.gz
yuzu-f3128fe915219a3564be366d3ab0c317422f0fc5.tar.bz2
yuzu-f3128fe915219a3564be366d3ab0c317422f0fc5.tar.lz
yuzu-f3128fe915219a3564be366d3ab0c317422f0fc5.tar.xz
yuzu-f3128fe915219a3564be366d3ab0c317422f0fc5.tar.zst
yuzu-f3128fe915219a3564be366d3ab0c317422f0fc5.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_vulkan/renderer_vulkan.cpp5
1 files changed, 5 insertions, 0 deletions
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);