| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> |
| | | Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | |
| | | #include "../SDL_internal.h" |
| | | |
| | | /* Useful functions and variables from SDL_joystick.c */ |
| | | #include "SDL_gamecontroller.h" |
| | | #include "SDL_joystick.h" |
| | | |
| | | struct _SDL_JoystickDriver; |
| | |
| | | /* Function to extract information from an SDL joystick GUID */ |
| | | extern void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version); |
| | | |
| | | /* Function to return whether a joystick is a PS4 controller */ |
| | | extern SDL_bool SDL_IsJoystickPS4(Uint16 vendor_id, Uint16 product_id); |
| | | /* Function to get a custom name for a controller manufacturer, if it's available */ |
| | | extern const char *SDL_GetCustomJoystickManufacturer(const char *manufacturer); |
| | | |
| | | /* Function to get a custom name for a controller, if it's available */ |
| | | extern const char *SDL_GetCustomJoystickName(Uint16 vendor, Uint16 product); |
| | | |
| | | /* Function to return the type of a controller */ |
| | | extern SDL_GameControllerType SDL_GetJoystickGameControllerTypeFromGUID(SDL_JoystickGUID guid, const char *name); |
| | | extern SDL_GameControllerType SDL_GetJoystickGameControllerType(const char *name, Uint16 vendor, Uint16 product, int interface_number, int interface_class, int interface_subclass, int interface_protocol); |
| | | |
| | | /* Function to return whether a joystick is a Nintendo Switch Pro controller */ |
| | | extern SDL_bool SDL_IsJoystickNintendoSwitchPro(Uint16 vendor_id, Uint16 product_id); |
| | | extern SDL_bool SDL_IsJoystickNintendoSwitchProInputOnly(Uint16 vendor_id, Uint16 product_id); |
| | | |
| | | /* Function to return whether a joystick is a Steam Controller */ |
| | | extern SDL_bool SDL_IsJoystickSteamController(Uint16 vendor_id, Uint16 product_id); |
| | | |
| | | /* Function to return whether a joystick is an Xbox 360 controller */ |
| | | extern SDL_bool SDL_IsJoystickXbox360(Uint16 vendor_id, Uint16 product_id); |
| | | |
| | | /* Function to return whether a joystick is an Xbox One controller */ |
| | | extern SDL_bool SDL_IsJoystickXboxOne(Uint16 vendor_id, Uint16 product_id); |
| | | |
| | | /* Function to return whether a joystick guid comes from the XInput driver */ |
| | | extern SDL_bool SDL_IsJoystickXInput(SDL_JoystickGUID guid); |
| | |
| | | SDL_JoystickPowerLevel ePowerLevel); |
| | | |
| | | /* Internal sanity checking functions */ |
| | | extern int SDL_PrivateJoystickValid(SDL_Joystick * joystick); |
| | | extern SDL_bool SDL_PrivateJoystickValid(SDL_Joystick * joystick); |
| | | |
| | | #endif /* SDL_joystick_c_h_ */ |
| | | |