Backends/SDL2/Controller: x
-> x != NULL
and fixed unequal braces
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
parent
a763984486
commit
d870805068
1 changed files with 3 additions and 1 deletions
|
@ -142,8 +142,10 @@ BOOL ControllerBackend_ResetJoystickStatus(void)
|
||||||
void ControllerBackend_JoystickConnect(Sint32 joystick_id)
|
void ControllerBackend_JoystickConnect(Sint32 joystick_id)
|
||||||
{
|
{
|
||||||
const char *joystick_name = SDL_JoystickNameForIndex(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);
|
Backend_PrintInfo("Joystick #%d connected - %s", joystick_id, joystick_name);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Backend_PrintError("Couldn't get joystick name: %s", SDL_GetError());
|
Backend_PrintError("Couldn't get joystick name: %s", SDL_GetError());
|
||||||
|
|
Loading…
Add table
Reference in a new issue