shithub: cstory

Download patch

ref: d0b8aef2818da7c59b7c8ac1178f7fca8bfc7523
parent: 92d565692aea7a9472a892f54ccef0b2b181f0fd
author: Gabriel Ravier <gabravier@gmail.com>
date: Sat Apr 11 21:18:19 EDT 2020

Backends/SDL2/Controller: `!x` -> `x == 0`

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>

--- a/src/Backends/SDL2/Controller.cpp
+++ b/src/Backends/SDL2/Controller.cpp
@@ -46,11 +46,11 @@
 
 	// 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;