Sfoglia il codice sorgente

Merge pull request #8267 from Morph1984/swapbuffers

renderer_vulkan: Update screen info if the framebuffer size has changed
bunnei 4 anni fa
parent
commit
f3128fe915
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      src/video_core/renderer_vulkan/renderer_vulkan.cpp

+ 5 - 0
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);