瀏覽代碼

renderer: Always use the output size when updating the main view

The main view always reflects the size of the output, so don't use the dimensions of the currently bound render target texture when updating it, or it will reflect an incorrect size when the render target texture is unbound.
Frank Praznik 4 月之前
父節點
當前提交
8aa5b97bb5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/render/SDL_render.c

+ 1 - 1
src/render/SDL_render.c

@@ -2627,7 +2627,7 @@ static void UpdateLogicalPresentation(SDL_Renderer *renderer)
     const float logical_h = view->logical_h;
     int iwidth, iheight;
 
-    if (renderer->target) {
+    if (!is_main_view && renderer->target) {
         iwidth = (int)renderer->target->w;
         iheight = (int)renderer->target->h;
     } else {