Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
replace bool stuff in controller_type.h with SDL_bool.
remove bool<->SDL_bool dance in SDL_joystick.c:SDL_IsJoystickSteamController()
after the controller_type.h change.
  • Loading branch information
sezero committed Sep 28, 2018
1 parent fde82e5 commit 5454765
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/joystick/SDL_joystick.c
Expand Up @@ -1135,7 +1135,7 @@ SDL_IsJoystickNintendoSwitchPro(Uint16 vendor, Uint16 product)
SDL_bool
SDL_IsJoystickSteamController(Uint16 vendor, Uint16 product)
{
return BIsSteamController(GuessControllerType(vendor, product)) ? SDL_TRUE : SDL_FALSE;
return BIsSteamController(GuessControllerType(vendor, product));
}

SDL_bool
Expand Down
3 changes: 1 addition & 2 deletions src/joystick/controller_type.h
Expand Up @@ -25,7 +25,6 @@
#endif

#ifndef __cplusplus
typedef enum { false, true } bool;
#define inline SDL_INLINE
#endif

Expand Down Expand Up @@ -65,7 +64,7 @@ typedef enum
k_eControllertype_GenericMouse = 800,
} EControllerType;

static inline bool BIsSteamController( EControllerType eType )
static inline SDL_bool BIsSteamController( EControllerType eType )
{
return ( eType == k_eControllerType_SteamController || eType == k_eControllerType_SteamControllerV2 );
}
Expand Down

0 comments on commit 5454765

Please sign in to comment.