From 6fb50bd0a65235af45fcfd12ec405fda7278138b Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 22 Nov 2021 11:16:23 +0100 Subject: [PATCH] =?UTF-8?q?Don't=20use=20"exp"=20as=20a=20name=20so=20that?= =?UTF-8?q?=20it's=20doesn=C2=B4t=20=20show=20up=20with=20searching=20for?= =?UTF-8?q?=20the=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/joystick/bsd/SDL_bsdjoystick.c | 4 ++-- src/joystick/windows/SDL_dinputjoystick.c | 4 ++-- src/joystick/windows/SDL_rawinputjoystick.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/joystick/bsd/SDL_bsdjoystick.c b/src/joystick/bsd/SDL_bsdjoystick.c index 8c5bbcbb3..2d3e10d05 100644 --- a/src/joystick/bsd/SDL_bsdjoystick.c +++ b/src/joystick/bsd/SDL_bsdjoystick.c @@ -552,7 +552,7 @@ BSD_JoystickUpdate(SDL_Joystick *joy) if (joy->hwdata->type == BSDJOY_JOY) { while (read(joy->hwdata->fd, &gameport, sizeof gameport) == sizeof gameport) { - if (abs(x - gameport.x) > 8) { + if (SDL_abs(x - gameport.x) > 8) { x = gameport.x; if (x < xmin) { xmin = x; @@ -569,7 +569,7 @@ BSD_JoystickUpdate(SDL_Joystick *joy) v *= 32768 / ((xmax - xmin + 1) / 2); SDL_PrivateJoystickAxis(joy, 0, v); } - if (abs(y - gameport.y) > 8) { + if (SDL_abs(y - gameport.y) > 8) { y = gameport.y; if (y < ymin) { ymin = y; diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c index 614c7de50..c5e0503fd 100644 --- a/src/joystick/windows/SDL_dinputjoystick.c +++ b/src/joystick/windows/SDL_dinputjoystick.c @@ -432,7 +432,7 @@ SDL_DINPUT_JoystickInit(void) static BOOL CALLBACK EnumJoystickDetectCallback(LPCDIDEVICEINSTANCE pDeviceInstance, LPVOID pContext) { -#define CHECK(exp) { if(!(exp)) goto err; } +#define CHECK(expression) { if(!(expression)) goto err; } JoyStick_DeviceData *pNewJoystick = NULL; JoyStick_DeviceData *pPrevJoystick = NULL; Uint16 *guid16; @@ -553,7 +553,7 @@ typedef struct static BOOL CALLBACK EnumJoystickPresentCallback(LPCDIDEVICEINSTANCE pDeviceInstance, LPVOID pContext) { -#define CHECK(exp) { if(!(exp)) goto err; } +#define CHECK(expression) { if(!(expression)) goto err; } Joystick_PresentData *pData = (Joystick_PresentData *)pContext; Uint16 vendor = 0; Uint16 product = 0; diff --git a/src/joystick/windows/SDL_rawinputjoystick.c b/src/joystick/windows/SDL_rawinputjoystick.c index d9ed3fd26..d0846636f 100644 --- a/src/joystick/windows/SDL_rawinputjoystick.c +++ b/src/joystick/windows/SDL_rawinputjoystick.c @@ -679,7 +679,7 @@ RAWINPUT_DeviceFromHandle(HANDLE hDevice) static void RAWINPUT_AddDevice(HANDLE hDevice) { -#define CHECK(exp) { if(!(exp)) goto err; } +#define CHECK(expression) { if(!(expression)) goto err; } SDL_RAWINPUT_Device *device = NULL; SDL_RAWINPUT_Device *curr, *last; RID_DEVICE_INFO rdi;