From 161dd83c9a0cb27fb8e954e2a3287c99b0e3bbcf Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 22 Nov 2021 11:15:23 +0100 Subject: [PATCH] =?UTF-8?q?Don=C2=B4t=20use=20"trunc"=20as=20var=20name,?= =?UTF-8?q?=20since=20it's=20also=20a=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/render/SDL_render.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 2b814e78a..cd8739d03 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -766,15 +766,15 @@ SDL_RendererEventWatch(void *userdata, SDL_Event *event) event->motion.y = (int)(event->motion.y / (scale.y * renderer->dpi_scale.y)); if (event->motion.xrel != 0 && renderer->relative_scaling) { 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 = (Sint32) trunc; + float truncated = SDL_truncf(rel); + renderer->xrel = rel - truncated; + event->motion.xrel = (Sint32) truncated; } 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 = (Sint32) trunc; + float truncated = SDL_truncf(rel); + renderer->yrel = rel - truncated; + event->motion.yrel = (Sint32) truncated; } } }