Commit 3e9ae3ea640e0f4081a19408cea08e477b510d30

Sylvain 2022-12-03T13:36:09

Fix wrong clang-tidy modification. This is an integer division. Thanks @meyraud705 (see PR #6725)

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 008fb28..35357ec 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -2313,9 +2313,9 @@ static int UpdateLogicalSize(SDL_Renderer *renderer, SDL_bool flush_viewport_cmd
 
     if (renderer->integer_scale) {
         if (want_aspect > real_aspect) {
-            scale = (float)(w) / renderer->logical_w;
+            scale = (float)(w / renderer->logical_w); /* This an integer division! */
         } else {
-            scale = (float)(h) / renderer->logical_h;
+            scale = (float)(h / renderer->logical_h); /* This an integer division! */
         }
 
         if (scale < 1.0f) {