replace bool stuff in controller_type.h with SDL_bool.
authorOzkan Sezer <sezeroz@gmail.com>
Fri, 28 Sep 2018 17:01:24 +0300
changeset 122529a334644da3e
parent 12251 47246ea2f62c
child 12253 2dbf011db466
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.
src/joystick/SDL_joystick.c
src/joystick/controller_type.h
     1.1 --- a/src/joystick/SDL_joystick.c	Fri Sep 28 14:01:40 2018 +0300
     1.2 +++ b/src/joystick/SDL_joystick.c	Fri Sep 28 17:01:24 2018 +0300
     1.3 @@ -1135,7 +1135,7 @@
     1.4  SDL_bool
     1.5  SDL_IsJoystickSteamController(Uint16 vendor, Uint16 product)
     1.6  {
     1.7 -    return BIsSteamController(GuessControllerType(vendor, product)) ? SDL_TRUE : SDL_FALSE;
     1.8 +    return BIsSteamController(GuessControllerType(vendor, product));
     1.9  }
    1.10  
    1.11  SDL_bool
     2.1 --- a/src/joystick/controller_type.h	Fri Sep 28 14:01:40 2018 +0300
     2.2 +++ b/src/joystick/controller_type.h	Fri Sep 28 17:01:24 2018 +0300
     2.3 @@ -25,7 +25,6 @@
     2.4  #endif
     2.5  
     2.6  #ifndef __cplusplus
     2.7 -typedef enum { false, true } bool;
     2.8  #define inline SDL_INLINE
     2.9  #endif
    2.10  
    2.11 @@ -65,7 +64,7 @@
    2.12  	k_eControllertype_GenericMouse = 800,
    2.13  } EControllerType;
    2.14  
    2.15 -static inline bool BIsSteamController( EControllerType eType )
    2.16 +static inline SDL_bool BIsSteamController( EControllerType eType )
    2.17  {
    2.18  	return ( eType == k_eControllerType_SteamController || eType == k_eControllerType_SteamControllerV2 );
    2.19  }