src/joystick/controller_type.h
changeset 12252 9a334644da3e
parent 12201 8bdc4d340419
child 12268 818dc37cace8
equal deleted inserted replaced
12251:47246ea2f62c 12252:9a334644da3e
    23 #ifdef _WIN32
    23 #ifdef _WIN32
    24 #pragma once
    24 #pragma once
    25 #endif
    25 #endif
    26 
    26 
    27 #ifndef __cplusplus
    27 #ifndef __cplusplus
    28 typedef enum { false, true } bool;
       
    29 #define inline SDL_INLINE
    28 #define inline SDL_INLINE
    30 #endif
    29 #endif
    31 
    30 
    32 //-----------------------------------------------------------------------------
    31 //-----------------------------------------------------------------------------
    33 // Purpose: Steam Controller models 
    32 // Purpose: Steam Controller models 
    63 	// Keyboards and Mice
    62 	// Keyboards and Mice
    64 	k_eControllertype_GenericKeyboard = 400,
    63 	k_eControllertype_GenericKeyboard = 400,
    65 	k_eControllertype_GenericMouse = 800,
    64 	k_eControllertype_GenericMouse = 800,
    66 } EControllerType;
    65 } EControllerType;
    67 
    66 
    68 static inline bool BIsSteamController( EControllerType eType )
    67 static inline SDL_bool BIsSteamController( EControllerType eType )
    69 {
    68 {
    70 	return ( eType == k_eControllerType_SteamController || eType == k_eControllerType_SteamControllerV2 );
    69 	return ( eType == k_eControllerType_SteamController || eType == k_eControllerType_SteamControllerV2 );
    71 }
    70 }
    72 
    71 
    73 #define MAKE_CONTROLLER_ID( nVID, nPID )	(unsigned int)( nVID << 16 | nPID )
    72 #define MAKE_CONTROLLER_ID( nVID, nPID )	(unsigned int)( nVID << 16 | nPID )