shithub: cstory

Download patch

ref: d870805068eddba3b067a9d3ab322549390f06f7
parent: a763984486e8f000e2471e4890372ec14f9fb2d0
author: Gabriel Ravier <gabravier@gmail.com>
date: Sat Apr 11 21:03:18 EDT 2020

Backends/SDL2/Controller: `x` -> `x != NULL` and fixed unequal braces

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

--- a/src/Backends/SDL2/Controller.cpp
+++ b/src/Backends/SDL2/Controller.cpp
@@ -142,8 +142,10 @@
 void ControllerBackend_JoystickConnect(Sint32 joystick_id)
 {
 	const char *joystick_name = SDL_JoystickNameForIndex(joystick_id);
-	if (joystick_name)
+	if (joystick_name != NULL)
+	{
 		Backend_PrintInfo("Joystick #%d connected - %s", joystick_id, joystick_name);
+	}
 	else
 	{
 		Backend_PrintError("Couldn't get joystick name: %s", SDL_GetError());