Commit a96d8a43558096e9cc7ec4616e983efaeb52a64f

Ryan C. Gordon 2020-04-13T22:05:36

render: Fixed compiler warning about implicit cast.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index a3c5f36..ce83553 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -664,13 +664,13 @@ SDL_RendererEventWatch(void *userdata, SDL_Event *event)
                     float rel = renderer->xrel + event->motion.xrel / (scale.x * renderer->dpi_scale.x);
                     float trunc = SDL_truncf(rel);
                     renderer->xrel = rel - trunc;
-                    event->motion.xrel = trunc;
+                    event->motion.xrel = (Sint32) trunc;
                 }
                 if (event->motion.yrel != 0 && renderer->relative_scaling) {
                     float rel = renderer->yrel + event->motion.yrel / (scale.y * renderer->dpi_scale.y);
                     float trunc = SDL_truncf(rel);
                     renderer->yrel = rel - trunc;
-                    event->motion.yrel = trunc;
+                    event->motion.yrel = (Sint32) trunc;
                 }
             }
         }