From 7687440273593f1713c69e93dbf65a2f90f9a312 Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 7 Nov 2020 16:23:48 -0800 Subject: [PATCH] Use SDL_abs() instead of libc abs() in ApplyFilter() Always good to use the SDL stdlib where possible. --- desktop_version/src/GraphicsUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/GraphicsUtil.cpp b/desktop_version/src/GraphicsUtil.cpp index 221fe2c0..847573ba 100644 --- a/desktop_version/src/GraphicsUtil.cpp +++ b/desktop_version/src/GraphicsUtil.cpp @@ -382,8 +382,8 @@ SDL_Surface* ApplyFilter( SDL_Surface* _src ) blue = static_cast(blue / 1.2f); } - int distX = static_cast((abs (160.0f -x ) / 160.0f) *16); - int distY = static_cast((abs (120.0f -y ) / 120.0f)*32); + int distX = static_cast((SDL_abs (160.0f -x ) / 160.0f) *16); + int distY = static_cast((SDL_abs (120.0f -y ) / 120.0f)*32); red = std::max(red - ( distX +distY), 0); green = std::max(green - ( distX +distY), 0);