From 5454765a2293863f0a3925ab7d2c710fbe481afd Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Fri, 28 Sep 2018 17:01:24 +0300 Subject: [PATCH] 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 | 2 +- src/joystick/controller_type.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index 5dece76fcc863..f7d862b3cc763 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -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 diff --git a/src/joystick/controller_type.h b/src/joystick/controller_type.h index 26054edfa0b1f..51ac20b4e1eb5 100644 --- a/src/joystick/controller_type.h +++ b/src/joystick/controller_type.h @@ -25,7 +25,6 @@ #endif #ifndef __cplusplus -typedef enum { false, true } bool; #define inline SDL_INLINE #endif @@ -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 ); }