Commit 70c8d20a46e6988f199ff8c1976f3cb49382a999

Sylvain 2021-11-13T15:04:19

Revert previous commit a50ca98e2b9ca10368b62e93b6a0977dc68fd584 (see bug #4625)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 1f84718..5c037c4 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -2266,9 +2266,9 @@ UpdateLogicalSize(SDL_Renderer *renderer)
 
     if (renderer->integer_scale) {
         if (want_aspect > real_aspect) {
-            scale = (float)w / renderer->logical_w;
+            scale = (float)(w / renderer->logical_w);
         } else {
-            scale = (float)h / renderer->logical_h;
+            scale = (float)(h / renderer->logical_h);
         }
         viewport.w = (int)SDL_floor(renderer->logical_w * scale);
         viewport.x = (w - viewport.w) / 2;