diff options
author | bunnei <bunneidev@gmail.com> | 2022-04-28 07:21:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 07:21:15 +0200 |
commit | f3128fe915219a3564be366d3ab0c317422f0fc5 (patch) | |
tree | 8293fb275aabb8a214140ed13583aef130c54d37 /src | |
parent | Merge pull request #8236 from Docteh/sort_translations (diff) | |
parent | renderer_vulkan: Update screen info if the framebuffer size has changed (diff) | |
download | yuzu-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 'src')
-rw-r--r-- | src/video_core/renderer_vulkan/renderer_vulkan.cpp | 5 |
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); |