From d0b8aef2818da7c59b7c8ac1178f7fca8bfc7523 Mon Sep 17 00:00:00 2001 From: Gabriel Ravier Date: Sun, 12 Apr 2020 01:18:19 +0200 Subject: [PATCH] Backends/SDL2/Controller: `!x` -> `x == 0` Signed-off-by: Gabriel Ravier --- src/Backends/SDL2/Controller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Backends/SDL2/Controller.cpp b/src/Backends/SDL2/Controller.cpp index 4c4d145c..3d0687d1 100644 --- a/src/Backends/SDL2/Controller.cpp +++ b/src/Backends/SDL2/Controller.cpp @@ -46,11 +46,11 @@ BOOL ControllerBackend_GetJoystickStatus(JOYSTICK_STATUS *status) // Handle directional inputs const Sint16 joystick_x = SDL_JoystickGetAxis(joystick, 0); - if (!joystick_x) + if (joystick_x == 0) Backend_PrintError("Failed to get current state of X axis control on joystick: %s", SDL_GetError()); const Sint16 joystick_y = SDL_JoystickGetAxis(joystick, 1); - if (!joystick_y) + if (joystick_y == 0) Backend_PrintError("Failed to get current state of Y axis control on joystick: %s", SDL_GetError()); status->bLeft = joystick_x < axis_neutrals[0] - DEADZONE;