mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-25 16:54:24 +00:00
SDL API renaming: SDL_joystick.h
Fixes https://github.com/libsdl-org/SDL/issues/6881
This commit is contained in:
@@ -107,7 +107,7 @@ typedef struct SDL_GameControllerButtonBind
|
||||
* To count the number of game controllers in the system for the following:
|
||||
*
|
||||
* ```c
|
||||
* int nJoysticks = SDL_NumJoysticks();
|
||||
* int nJoysticks = SDL_GetNumJoysticks();
|
||||
* int nGameControllers = 0;
|
||||
* for (int i = 0; i < nJoysticks; i++) {
|
||||
* if (SDL_IsGameController(i)) {
|
||||
@@ -119,7 +119,7 @@ typedef struct SDL_GameControllerButtonBind
|
||||
* Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
|
||||
* guid,name,mappings
|
||||
*
|
||||
* Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
|
||||
* Where GUID is the string value from SDL_GetJoystickGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
|
||||
* Under Windows there is a reserved GUID of "xinput" that covers any XInput devices.
|
||||
* The mapping format for joystick is:
|
||||
* bX - a joystick button, index X
|
||||
@@ -176,7 +176,7 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw,
|
||||
* controller to have a different binding.
|
||||
*
|
||||
* The mapping string has the format "GUID,name,mapping", where GUID is the
|
||||
* string value from SDL_JoystickGetGUIDString(), name is the human readable
|
||||
* string value from SDL_GetJoystickGUIDString(), name is the human readable
|
||||
* string for the device and mappings are controller mappings to joystick
|
||||
* ones. Under Windows there is a reserved GUID of "xinput" that covers all
|
||||
* XInput devices. The mapping format for joystick is: {| |bX |a joystick
|
||||
@@ -230,8 +230,8 @@ extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_ind
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetDeviceGUID
|
||||
* \sa SDL_JoystickGetGUID
|
||||
* \sa SDL_GetJoystickDeviceGUID
|
||||
* \sa SDL_GetJoystickGUID
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid);
|
||||
|
||||
@@ -258,10 +258,10 @@ extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController *gam
|
||||
* Check if the given joystick is supported by the game controller interface.
|
||||
*
|
||||
* `joystick_index` is the same as the `device_index` passed to
|
||||
* SDL_JoystickOpen().
|
||||
* SDL_OpenJoystick().
|
||||
*
|
||||
* \param joystick_index the device_index of a device, up to
|
||||
* SDL_NumJoysticks()
|
||||
* SDL_GetNumJoysticks()
|
||||
* \returns SDL_TRUE if the given joystick is supported by the game controller
|
||||
* interface, SDL_FALSE if it isn't or it's an invalid index.
|
||||
*
|
||||
@@ -278,10 +278,10 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
|
||||
* This function can be called before any controllers are opened.
|
||||
*
|
||||
* `joystick_index` is the same as the `device_index` passed to
|
||||
* SDL_JoystickOpen().
|
||||
* SDL_OpenJoystick().
|
||||
*
|
||||
* \param joystick_index the device_index of a device, from zero to
|
||||
* SDL_NumJoysticks()-1
|
||||
* SDL_GetNumJoysticks()-1
|
||||
* \returns the implementation-dependent name for the game controller, or NULL
|
||||
* if there is no name or the index is invalid.
|
||||
*
|
||||
@@ -299,10 +299,10 @@ extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_
|
||||
* This function can be called before any controllers are opened.
|
||||
*
|
||||
* `joystick_index` is the same as the `device_index` passed to
|
||||
* SDL_JoystickOpen().
|
||||
* SDL_OpenJoystick().
|
||||
*
|
||||
* \param joystick_index the device_index of a device, from zero to
|
||||
* SDL_NumJoysticks()-1
|
||||
* SDL_GetNumJoysticks()-1
|
||||
* \returns the implementation-dependent path for the game controller, or NULL
|
||||
* if there is no path or the index is invalid.
|
||||
*
|
||||
@@ -318,7 +318,7 @@ extern DECLSPEC const char *SDLCALL SDL_GameControllerPathForIndex(int joystick_
|
||||
* This can be called before any controllers are opened.
|
||||
*
|
||||
* \param joystick_index the device_index of a device, from zero to
|
||||
* SDL_NumJoysticks()-1
|
||||
* SDL_GetNumJoysticks()-1
|
||||
* \returns the controller type.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
@@ -331,7 +331,7 @@ extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(in
|
||||
* This can be called before any controllers are opened.
|
||||
*
|
||||
* \param joystick_index the device_index of a device, from zero to
|
||||
* SDL_NumJoysticks()-1
|
||||
* SDL_GetNumJoysticks()-1
|
||||
* \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
|
||||
* no mapping is available.
|
||||
*
|
||||
@@ -343,7 +343,7 @@ extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joysti
|
||||
* Open a game controller for use.
|
||||
*
|
||||
* `joystick_index` is the same as the `device_index` passed to
|
||||
* SDL_JoystickOpen().
|
||||
* SDL_OpenJoystick().
|
||||
*
|
||||
* The index passed as an argument refers to the N'th game controller on the
|
||||
* system. This index is not the value which will identify this controller in
|
||||
@@ -351,7 +351,7 @@ extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joysti
|
||||
* be used there instead.
|
||||
*
|
||||
* \param joystick_index the device_index of a device, up to
|
||||
* SDL_NumJoysticks()
|
||||
* SDL_GetNumJoysticks()
|
||||
* \returns a gamecontroller identifier or NULL if an error occurred; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
@@ -548,7 +548,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameControlle
|
||||
* value).
|
||||
*
|
||||
* The pointer returned is owned by the SDL_GameController. You should not
|
||||
* call SDL_JoystickClose() on it, for example, since doing so will likely
|
||||
* call SDL_CloseJoystick() on it, for example, since doing so will likely
|
||||
* cause SDL to crash.
|
||||
*
|
||||
* \param gamecontroller the game controller object that you want to get a
|
||||
@@ -575,7 +575,7 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameCont
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickEventState
|
||||
* \sa SDL_GetJoystickEventState
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);
|
||||
|
||||
|
||||
@@ -296,8 +296,8 @@ extern "C" {
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
*
|
||||
* "0" - You'll call SDL_JoystickUpdate() manually
|
||||
* "1" - SDL will automatically call SDL_JoystickUpdate() (default)
|
||||
* "0" - You'll call SDL_UpdateJoysticks() manually
|
||||
* "1" - SDL will automatically call SDL_UpdateJoysticks() (default)
|
||||
*
|
||||
* This hint can be toggled on and off at runtime.
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*
|
||||
* Include file for SDL joystick event handling
|
||||
*
|
||||
* The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
|
||||
* The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_GetNumJoysticks(), with the exact joystick
|
||||
* behind a device_index changing as joysticks are plugged and unplugged.
|
||||
*
|
||||
* The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
|
||||
@@ -160,11 +160,11 @@ extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickName
|
||||
* \sa SDL_JoystickPath
|
||||
* \sa SDL_JoystickOpen
|
||||
* \sa SDL_GetJoystickName
|
||||
* \sa SDL_GetJoystickPath
|
||||
* \sa SDL_OpenJoystick
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumJoysticks(void);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent name of a joystick.
|
||||
@@ -178,10 +178,10 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickName
|
||||
* \sa SDL_JoystickOpen
|
||||
* \sa SDL_GetJoystickName
|
||||
* \sa SDL_OpenJoystick
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetJoystickNameForIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent path of a joystick.
|
||||
@@ -195,10 +195,10 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickPath
|
||||
* \sa SDL_JoystickOpen
|
||||
* \sa SDL_GetJoystickPath
|
||||
* \sa SDL_OpenJoystick
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickPathForIndex(int device_index);
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetJoystickPathForIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Get the player index of a joystick, or -1 if it's not available This can be
|
||||
@@ -206,7 +206,7 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickPathForIndex(int device_index);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
|
||||
extern DECLSPEC int SDLCALL SDL_GetJoystickDevicePlayerIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Get the implementation-dependent GUID for the joystick at a given device
|
||||
@@ -221,10 +221,10 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetGUID
|
||||
* \sa SDL_JoystickGetGUIDString
|
||||
* \sa SDL_GetJoystickGUID
|
||||
* \sa SDL_GetJoystickGUIDString
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickDeviceGUID(int device_index);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of a joystick, if available.
|
||||
@@ -239,7 +239,7 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_in
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GetJoystickDeviceVendor(int device_index);
|
||||
|
||||
/**
|
||||
* Get the USB product ID of a joystick, if available.
|
||||
@@ -254,7 +254,7 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GetJoystickDeviceProduct(int device_index);
|
||||
|
||||
/**
|
||||
* Get the product version of a joystick, if available.
|
||||
@@ -269,7 +269,7 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GetJoystickDeviceProductVersion(int device_index);
|
||||
|
||||
/**
|
||||
* Get the type of a joystick, if available.
|
||||
@@ -283,7 +283,7 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_in
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index);
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickDeviceType(int device_index);
|
||||
|
||||
/**
|
||||
* Get the instance ID of a joystick.
|
||||
@@ -298,7 +298,7 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_in
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index);
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_GetJoystickDeviceInstanceID(int device_index);
|
||||
|
||||
/**
|
||||
* Open a joystick for use.
|
||||
@@ -306,7 +306,7 @@ extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int devic
|
||||
* The `device_index` argument refers to the N'th joystick presently
|
||||
* recognized by SDL on the system. It is **NOT** the same as the instance ID
|
||||
* used to identify the joystick in future events. See
|
||||
* SDL_JoystickInstanceID() for more details about instance IDs.
|
||||
* SDL_GetJoystickInstanceID() for more details about instance IDs.
|
||||
*
|
||||
* The joystick subsystem must be initialized before a joystick can be opened
|
||||
* for use.
|
||||
@@ -317,10 +317,10 @@ extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int devic
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickClose
|
||||
* \sa SDL_JoystickInstanceID
|
||||
* \sa SDL_CloseJoystick
|
||||
* \sa SDL_GetJoystickInstanceID
|
||||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_OpenJoystick(int device_index);
|
||||
|
||||
/**
|
||||
* Get the SDL_Joystick associated with an instance id.
|
||||
@@ -331,7 +331,7 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID instance_id);
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_GetJoystickFromInstanceID(SDL_JoystickID instance_id);
|
||||
|
||||
/**
|
||||
* Get the SDL_Joystick associated with a player index.
|
||||
@@ -342,7 +342,7 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index);
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_GetJoystickFromPlayerIndex(int player_index);
|
||||
|
||||
/**
|
||||
* Attach a new virtual joystick.
|
||||
@@ -351,7 +351,7 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_ind
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type,
|
||||
extern DECLSPEC int SDLCALL SDL_AttachVirtualJoystick(SDL_JoystickType type,
|
||||
int naxes,
|
||||
int nbuttons,
|
||||
int nhats);
|
||||
@@ -359,10 +359,10 @@ extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type,
|
||||
/**
|
||||
* The structure that defines an extended virtual joystick description
|
||||
*
|
||||
* The caller must zero the structure and then initialize the version with `SDL_VIRTUAL_JOYSTICK_DESC_VERSION` before passing it to SDL_JoystickAttachVirtualEx()
|
||||
* The caller must zero the structure and then initialize the version with `SDL_VIRTUAL_JOYSTICK_DESC_VERSION` before passing it to SDL_AttachVirtualJoystickEx()
|
||||
* All other elements of this structure are optional and can be left 0.
|
||||
*
|
||||
* \sa SDL_JoystickAttachVirtualEx
|
||||
* \sa SDL_AttachVirtualJoystickEx
|
||||
*/
|
||||
typedef struct SDL_VirtualJoystickDesc
|
||||
{
|
||||
@@ -383,10 +383,10 @@ typedef struct SDL_VirtualJoystickDesc
|
||||
void *userdata; /**< User data pointer passed to callbacks */
|
||||
void (SDLCALL *Update)(void *userdata); /**< Called when the joystick state should be updated */
|
||||
void (SDLCALL *SetPlayerIndex)(void *userdata, int player_index); /**< Called when the player index is set */
|
||||
int (SDLCALL *Rumble)(void *userdata, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble); /**< Implements SDL_JoystickRumble() */
|
||||
int (SDLCALL *RumbleTriggers)(void *userdata, Uint16 left_rumble, Uint16 right_rumble); /**< Implements SDL_JoystickRumbleTriggers() */
|
||||
int (SDLCALL *SetLED)(void *userdata, Uint8 red, Uint8 green, Uint8 blue); /**< Implements SDL_JoystickSetLED() */
|
||||
int (SDLCALL *SendEffect)(void *userdata, const void *data, int size); /**< Implements SDL_JoystickSendEffect() */
|
||||
int (SDLCALL *Rumble)(void *userdata, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble); /**< Implements SDL_RumbleJoystick() */
|
||||
int (SDLCALL *RumbleTriggers)(void *userdata, Uint16 left_rumble, Uint16 right_rumble); /**< Implements SDL_RumbleJoystickTriggers() */
|
||||
int (SDLCALL *SetLED)(void *userdata, Uint8 red, Uint8 green, Uint8 blue); /**< Implements SDL_SetJoystickLED() */
|
||||
int (SDLCALL *SendEffect)(void *userdata, const void *data, int size); /**< Implements SDL_SendJoystickEffect() */
|
||||
|
||||
} SDL_VirtualJoystickDesc;
|
||||
|
||||
@@ -402,18 +402,18 @@ typedef struct SDL_VirtualJoystickDesc
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtualEx(const SDL_VirtualJoystickDesc *desc);
|
||||
extern DECLSPEC int SDLCALL SDL_AttachVirtualJoystickEx(const SDL_VirtualJoystickDesc *desc);
|
||||
|
||||
/**
|
||||
* Detach a virtual joystick.
|
||||
*
|
||||
* \param device_index a value previously returned from
|
||||
* SDL_JoystickAttachVirtual()
|
||||
* SDL_AttachVirtualJoystick()
|
||||
* \returns 0 on success, or -1 if an error occurred.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);
|
||||
extern DECLSPEC int SDLCALL SDL_DetachVirtualJoystick(int device_index);
|
||||
|
||||
/**
|
||||
* Query whether or not the joystick at a given device index is virtual.
|
||||
@@ -423,13 +423,13 @@ extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsJoystickVirtual(int device_index);
|
||||
|
||||
/**
|
||||
* Set values on an opened, virtual-joystick's axis.
|
||||
*
|
||||
* Please note that values set here will not be applied until the next call to
|
||||
* SDL_JoystickUpdate, which can either be called directly, or can be called
|
||||
* SDL_UpdateJoysticks, which can either be called directly, or can be called
|
||||
* indirectly through various other SDL APIs, including, but not limited to
|
||||
* the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
|
||||
* SDL_WaitEvent.
|
||||
@@ -445,13 +445,13 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value);
|
||||
extern DECLSPEC int SDLCALL SDL_SetJoystickVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value);
|
||||
|
||||
/**
|
||||
* Set values on an opened, virtual-joystick's button.
|
||||
*
|
||||
* Please note that values set here will not be applied until the next call to
|
||||
* SDL_JoystickUpdate, which can either be called directly, or can be called
|
||||
* SDL_UpdateJoysticks, which can either be called directly, or can be called
|
||||
* indirectly through various other SDL APIs, including, but not limited to
|
||||
* the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
|
||||
* SDL_WaitEvent.
|
||||
@@ -463,13 +463,13 @@ extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, i
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value);
|
||||
extern DECLSPEC int SDLCALL SDL_SetJoystickVirtualButton(SDL_Joystick *joystick, int button, Uint8 value);
|
||||
|
||||
/**
|
||||
* Set values on an opened, virtual-joystick's hat.
|
||||
*
|
||||
* Please note that values set here will not be applied until the next call to
|
||||
* SDL_JoystickUpdate, which can either be called directly, or can be called
|
||||
* SDL_UpdateJoysticks, which can either be called directly, or can be called
|
||||
* indirectly through various other SDL APIs, including, but not limited to
|
||||
* the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
|
||||
* SDL_WaitEvent.
|
||||
@@ -481,34 +481,34 @@ extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick,
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value);
|
||||
extern DECLSPEC int SDLCALL SDL_SetJoystickVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent name of a joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param joystick the SDL_Joystick obtained from SDL_OpenJoystick()
|
||||
* \returns the name of the selected joystick. If no name can be found, this
|
||||
* function returns NULL; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickNameForIndex
|
||||
* \sa SDL_JoystickOpen
|
||||
* \sa SDL_GetJoystickNameForIndex
|
||||
* \sa SDL_OpenJoystick
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick);
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetJoystickName(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent path of a joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param joystick the SDL_Joystick obtained from SDL_OpenJoystick()
|
||||
* \returns the path of the selected joystick. If no path can be found, this
|
||||
* function returns NULL; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickPathForIndex
|
||||
* \sa SDL_GetJoystickPathForIndex
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickPath(SDL_Joystick *joystick);
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetJoystickPath(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the player index of an opened joystick.
|
||||
@@ -516,112 +516,112 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickPath(SDL_Joystick *joystick);
|
||||
* For XInput controllers this returns the XInput user index. Many joysticks
|
||||
* will not be able to supply this information.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param joystick the SDL_Joystick obtained from SDL_OpenJoystick()
|
||||
* \returns the player index, or -1 if it's not available.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_GetJoystickPlayerIndex(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Set the player index of an opened joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param joystick the SDL_Joystick obtained from SDL_OpenJoystick()
|
||||
* \param player_index Player index to assign to this joystick, or -1 to clear
|
||||
* the player index and turn off player LEDs.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index);
|
||||
extern DECLSPEC void SDLCALL SDL_SetJoystickPlayerIndex(SDL_Joystick *joystick, int player_index);
|
||||
|
||||
/**
|
||||
* Get the implementation-dependent GUID for the joystick.
|
||||
*
|
||||
* This function requires an open joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param joystick the SDL_Joystick obtained from SDL_OpenJoystick()
|
||||
* \returns the GUID of the given joystick. If called on an invalid index,
|
||||
* this function returns a zero GUID; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetDeviceGUID
|
||||
* \sa SDL_JoystickGetGUIDString
|
||||
* \sa SDL_GetJoystickDeviceGUID
|
||||
* \sa SDL_GetJoystickGUIDString
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick *joystick);
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUID(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of an opened joystick, if available.
|
||||
*
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param joystick the SDL_Joystick obtained from SDL_OpenJoystick()
|
||||
* \returns the USB vendor ID of the selected joystick, or 0 if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendor(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the USB product ID of an opened joystick, if available.
|
||||
*
|
||||
* If the product ID isn't available this function returns 0.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param joystick the SDL_Joystick obtained from SDL_OpenJoystick()
|
||||
* \returns the USB product ID of the selected joystick, or 0 if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GetJoystickProduct(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the product version of an opened joystick, if available.
|
||||
*
|
||||
* If the product version isn't available this function returns 0.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param joystick the SDL_Joystick obtained from SDL_OpenJoystick()
|
||||
* \returns the product version of the selected joystick, or 0 if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersion(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the firmware version of an opened joystick, if available.
|
||||
*
|
||||
* If the firmware version isn't available this function returns 0.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param joystick the SDL_Joystick obtained from SDL_OpenJoystick()
|
||||
* \returns the firmware version of the selected joystick, or 0 if
|
||||
* unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetFirmwareVersion(SDL_Joystick *joystick);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GetJoystickFirmwareVersion(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the serial number of an opened joystick, if available.
|
||||
*
|
||||
* Returns the serial number of the joystick, or NULL if it is not available.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param joystick the SDL_Joystick obtained from SDL_OpenJoystick()
|
||||
* \returns the serial number of the selected joystick, or NULL if
|
||||
* unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystick);
|
||||
extern DECLSPEC const char * SDLCALL SDL_GetJoystickSerial(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the type of an opened joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param joystick the SDL_Joystick obtained from SDL_OpenJoystick()
|
||||
* \returns the SDL_JoystickType of the selected joystick.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joystick);
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickType(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get an ASCII string representation for a given SDL_JoystickGUID.
|
||||
@@ -634,11 +634,11 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joyst
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetDeviceGUID
|
||||
* \sa SDL_JoystickGetGUID
|
||||
* \sa SDL_JoystickGetGUIDFromString
|
||||
* \sa SDL_GetJoystickDeviceGUID
|
||||
* \sa SDL_GetJoystickGUID
|
||||
* \sa SDL_GetJoystickGUIDFromString
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
|
||||
extern DECLSPEC void SDLCALL SDL_GetJoystickGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
|
||||
|
||||
/**
|
||||
* Convert a GUID string into a SDL_JoystickGUID structure.
|
||||
@@ -652,9 +652,9 @@ extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, ch
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetGUIDString
|
||||
* \sa SDL_GetJoystickGUIDString
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUIDFromString(const char *pchGUID);
|
||||
|
||||
/**
|
||||
* Get the device information encoded in a SDL_JoystickGUID structure
|
||||
@@ -671,7 +671,7 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const cha
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetDeviceGUID
|
||||
* \sa SDL_GetJoystickDeviceGUID
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16);
|
||||
|
||||
@@ -684,10 +684,10 @@ extern DECLSPEC void SDLCALL SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickClose
|
||||
* \sa SDL_JoystickOpen
|
||||
* \sa SDL_CloseJoystick
|
||||
* \sa SDL_OpenJoystick
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick *joystick);
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsJoystickConnected(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the instance ID of an opened joystick.
|
||||
@@ -698,9 +698,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick *joystick)
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickOpen
|
||||
* \sa SDL_OpenJoystick
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joystick);
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_GetJoystickInstanceID(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the number of general axis controls on a joystick.
|
||||
@@ -716,10 +716,10 @@ extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joys
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetAxis
|
||||
* \sa SDL_JoystickOpen
|
||||
* \sa SDL_GetJoystickAxis
|
||||
* \sa SDL_OpenJoystick
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumJoystickAxes(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the number of POV hats on a joystick.
|
||||
@@ -730,10 +730,10 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetHat
|
||||
* \sa SDL_JoystickOpen
|
||||
* \sa SDL_GetJoystickHat
|
||||
* \sa SDL_OpenJoystick
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumJoystickHats(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the number of buttons on a joystick.
|
||||
@@ -744,10 +744,10 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetButton
|
||||
* \sa SDL_JoystickOpen
|
||||
* \sa SDL_GetJoystickButton
|
||||
* \sa SDL_OpenJoystick
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumJoystickButtons(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Update the current state of the open joysticks.
|
||||
@@ -757,14 +757,14 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickEventState
|
||||
* \sa SDL_GetJoystickEventState
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
|
||||
extern DECLSPEC void SDLCALL SDL_UpdateJoysticks(void);
|
||||
|
||||
/**
|
||||
* Enable/disable joystick event polling.
|
||||
*
|
||||
* If joystick events are disabled, you must call SDL_JoystickUpdate()
|
||||
* If joystick events are disabled, you must call SDL_UpdateJoysticks()
|
||||
* yourself and manually check the state of the joystick when you want
|
||||
* joystick information.
|
||||
*
|
||||
@@ -784,7 +784,7 @@ extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
|
||||
*
|
||||
* \sa SDL_GameControllerEventState
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
|
||||
extern DECLSPEC int SDLCALL SDL_GetJoystickEventState(int state);
|
||||
|
||||
#define SDL_JOYSTICK_AXIS_MAX 32767
|
||||
#define SDL_JOYSTICK_AXIS_MIN -32768
|
||||
@@ -798,7 +798,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
|
||||
* Game Controller API makes a great effort to apply order to this lower-level
|
||||
* interface, so you know that a specific axis is the "left thumb stick," etc.
|
||||
*
|
||||
* The value returned by SDL_JoystickGetAxis() is a signed integer (-32768 to
|
||||
* The value returned by SDL_GetJoystickAxis() is a signed integer (-32768 to
|
||||
* 32767) representing the current position of the axis. It may be necessary
|
||||
* to impose certain tolerances on these values to account for jitter.
|
||||
*
|
||||
@@ -809,9 +809,9 @@ extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickNumAxes
|
||||
* \sa SDL_GetNumJoystickAxes
|
||||
*/
|
||||
extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick,
|
||||
extern DECLSPEC Sint16 SDLCALL SDL_GetJoystickAxis(SDL_Joystick *joystick,
|
||||
int axis);
|
||||
|
||||
/**
|
||||
@@ -828,7 +828,7 @@ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick,
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick,
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GetJoystickAxisInitialState(SDL_Joystick *joystick,
|
||||
int axis, Sint16 *state);
|
||||
|
||||
/**
|
||||
@@ -867,9 +867,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *j
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickNumHats
|
||||
* \sa SDL_GetNumJoystickHats
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick,
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_GetJoystickHat(SDL_Joystick *joystick,
|
||||
int hat);
|
||||
|
||||
/**
|
||||
@@ -882,9 +882,9 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick,
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickNumButtons
|
||||
* \sa SDL_GetNumJoystickButtons
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick,
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_GetJoystickButton(SDL_Joystick *joystick,
|
||||
int button);
|
||||
|
||||
/**
|
||||
@@ -905,7 +905,7 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick,
|
||||
*
|
||||
* \sa SDL_JoystickHasRumble
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
extern DECLSPEC int SDLCALL SDL_RumbleJoystick(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Start a rumble effect in the joystick's triggers
|
||||
@@ -915,7 +915,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 lo
|
||||
*
|
||||
* Note that this is rumbling of the _triggers_ and not the game controller as
|
||||
* a whole. This is currently only supported on Xbox One controllers. If you
|
||||
* want the (more common) whole-controller rumble, use SDL_JoystickRumble()
|
||||
* want the (more common) whole-controller rumble, use SDL_RumbleJoystick()
|
||||
* instead.
|
||||
*
|
||||
* \param joystick The joystick to vibrate
|
||||
@@ -930,7 +930,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 lo
|
||||
*
|
||||
* \sa SDL_JoystickHasRumbleTriggers
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
|
||||
extern DECLSPEC int SDLCALL SDL_RumbleJoystickTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Query whether a joystick has an LED.
|
||||
@@ -953,7 +953,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickRumble
|
||||
* \sa SDL_RumbleJoystick
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumble(SDL_Joystick *joystick);
|
||||
|
||||
@@ -965,7 +965,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumble(SDL_Joystick *joystick);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickRumbleTriggers
|
||||
* \sa SDL_RumbleJoystickTriggers
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumbleTriggers(SDL_Joystick *joystick);
|
||||
|
||||
@@ -983,7 +983,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumbleTriggers(SDL_Joystick *joy
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue);
|
||||
extern DECLSPEC int SDLCALL SDL_SetJoystickLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue);
|
||||
|
||||
/**
|
||||
* Send a joystick specific effect packet
|
||||
@@ -995,18 +995,18 @@ extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size);
|
||||
extern DECLSPEC int SDLCALL SDL_SendJoystickEffect(SDL_Joystick *joystick, const void *data, int size);
|
||||
|
||||
/**
|
||||
* Close a joystick previously opened with SDL_JoystickOpen().
|
||||
* Close a joystick previously opened with SDL_OpenJoystick().
|
||||
*
|
||||
* \param joystick The joystick device to close
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickOpen
|
||||
* \sa SDL_OpenJoystick
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
|
||||
extern DECLSPEC void SDLCALL SDL_CloseJoystick(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the battery level of a joystick as SDL_JoystickPowerLevel.
|
||||
@@ -1017,7 +1017,7 @@ extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick);
|
||||
extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_GetJoystickPowerLevel(SDL_Joystick *joystick);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -49,6 +49,58 @@
|
||||
#define SDL_FreeWAV SDL_free
|
||||
#define SDL_NewAudioStream SDL_CreateAudioStream
|
||||
|
||||
/* ##SDL_joystick.h */
|
||||
#define SDL_JoystickAttachVirtual SDL_AttachVirtualJoystick
|
||||
#define SDL_JoystickAttachVirtualEx SDL_AttachVirtualJoystickEx
|
||||
#define SDL_JoystickClose SDL_CloseJoystick
|
||||
#define SDL_JoystickCurrentPowerLevel SDL_GetJoystickPowerLevel
|
||||
#define SDL_JoystickDetachVirtual SDL_DetachVirtualJoystick
|
||||
#define SDL_JoystickEventState SDL_GetJoystickEventState
|
||||
#define SDL_JoystickFromInstanceID SDL_GetJoystickFromInstanceID
|
||||
#define SDL_JoystickFromPlayerIndex SDL_GetJoystickFromPlayerIndex
|
||||
#define SDL_JoystickGetAttached SDL_IsJoystickConnected
|
||||
#define SDL_JoystickGetAxis SDL_GetJoystickAxis
|
||||
#define SDL_JoystickGetAxisInitialState SDL_GetJoystickAxisInitialState
|
||||
#define SDL_JoystickGetButton SDL_GetJoystickButton
|
||||
#define SDL_JoystickGetDeviceGUID SDL_GetJoystickDeviceGUID
|
||||
#define SDL_JoystickGetDeviceInstanceID SDL_GetJoystickDeviceInstanceID
|
||||
#define SDL_JoystickGetDevicePlayerIndex SDL_GetJoystickDevicePlayerIndex
|
||||
#define SDL_JoystickGetDeviceProduct SDL_GetJoystickDeviceProduct
|
||||
#define SDL_JoystickGetDeviceProductVersion SDL_GetJoystickDeviceProductVersion
|
||||
#define SDL_JoystickGetDeviceType SDL_GetJoystickDeviceType
|
||||
#define SDL_JoystickGetDeviceVendor SDL_GetJoystickDeviceVendor
|
||||
#define SDL_JoystickGetFirmwareVersion SDL_GetJoystickFirmwareVersion
|
||||
#define SDL_JoystickGetGUID SDL_GetJoystickGUID
|
||||
#define SDL_JoystickGetGUIDFromString SDL_GetJoystickGUIDFromString
|
||||
#define SDL_JoystickGetGUIDString SDL_GetJoystickGUIDString
|
||||
#define SDL_JoystickGetHat SDL_GetJoystickHat
|
||||
#define SDL_JoystickGetPlayerIndex SDL_GetJoystickPlayerIndex
|
||||
#define SDL_JoystickGetProduct SDL_GetJoystickProduct
|
||||
#define SDL_JoystickGetProductVersion SDL_GetJoystickProductVersion
|
||||
#define SDL_JoystickGetSerial SDL_GetJoystickSerial
|
||||
#define SDL_JoystickGetType SDL_GetJoystickType
|
||||
#define SDL_JoystickGetVendor SDL_GetJoystickVendor
|
||||
#define SDL_JoystickInstanceID SDL_GetJoystickInstanceID
|
||||
#define SDL_JoystickIsVirtual SDL_IsJoystickVirtual
|
||||
#define SDL_JoystickName SDL_GetJoystickName
|
||||
#define SDL_JoystickNameForIndex SDL_GetJoystickNameForIndex
|
||||
#define SDL_JoystickNumAxes SDL_GetNumJoystickAxes
|
||||
#define SDL_JoystickNumButtons SDL_GetNumJoystickButtons
|
||||
#define SDL_JoystickNumHats SDL_GetNumJoystickHats
|
||||
#define SDL_JoystickOpen SDL_OpenJoystick
|
||||
#define SDL_JoystickPath SDL_GetJoystickPath
|
||||
#define SDL_JoystickPathForIndex SDL_GetJoystickPathForIndex
|
||||
#define SDL_JoystickRumble SDL_RumbleJoystick
|
||||
#define SDL_JoystickRumbleTriggers SDL_RumbleJoystickTriggers
|
||||
#define SDL_JoystickSendEffect SDL_SendJoystickEffect
|
||||
#define SDL_JoystickSetLED SDL_SetJoystickLED
|
||||
#define SDL_JoystickSetPlayerIndex SDL_SetJoystickPlayerIndex
|
||||
#define SDL_JoystickSetVirtualAxis SDL_SetJoystickVirtualAxis
|
||||
#define SDL_JoystickSetVirtualButton SDL_SetJoystickVirtualButton
|
||||
#define SDL_JoystickSetVirtualHat SDL_SetJoystickVirtualHat
|
||||
#define SDL_JoystickUpdate SDL_UpdateJoysticks
|
||||
#define SDL_NumJoysticks SDL_GetNumJoysticks
|
||||
|
||||
/* ##SDL_keycode.h */
|
||||
#define KMOD_ALT SDL_KMOD_ALT
|
||||
#define KMOD_CAPS SDL_KMOD_CAPS
|
||||
@@ -94,6 +146,58 @@
|
||||
#define SDL_FreeWAV SDL_FreeWAV_renamed_SDL_free
|
||||
#define SDL_NewAudioStream SDL_NewAudioStream_renamed_SDL_CreateAudioStream
|
||||
|
||||
/* ##SDL_joystick.h */
|
||||
#define SDL_JoystickAttachVirtual SDL_JoystickAttachVirtual_renamed_SDL_AttachVirtualJoystick
|
||||
#define SDL_JoystickAttachVirtualEx SDL_JoystickAttachVirtualEx_renamed_SDL_AttachVirtualJoystickEx
|
||||
#define SDL_JoystickClose SDL_JoystickClose_renamed_SDL_CloseJoystick
|
||||
#define SDL_JoystickCurrentPowerLevel SDL_JoystickCurrentPowerLevel_renamed_SDL_GetJoystickPowerLevel
|
||||
#define SDL_JoystickDetachVirtual SDL_JoystickDetachVirtual_renamed_SDL_DetachVirtualJoystick
|
||||
#define SDL_JoystickEventState SDL_JoystickEventState_renamed_SDL_GetJoystickEventState
|
||||
#define SDL_JoystickFromInstanceID SDL_JoystickFromInstanceID_renamed_SDL_GetJoystickFromInstanceID
|
||||
#define SDL_JoystickFromPlayerIndex SDL_JoystickFromPlayerIndex_renamed_SDL_GetJoystickFromPlayerIndex
|
||||
#define SDL_JoystickGetAttached SDL_JoystickGetAttached_renamed_SDL_IsJoystickConnected
|
||||
#define SDL_JoystickGetAxis SDL_JoystickGetAxis_renamed_SDL_GetJoystickAxis
|
||||
#define SDL_JoystickGetAxisInitialState SDL_JoystickGetAxisInitialState_renamed_SDL_GetJoystickAxisInitialState
|
||||
#define SDL_JoystickGetButton SDL_JoystickGetButton_renamed_SDL_GetJoystickButton
|
||||
#define SDL_JoystickGetDeviceGUID SDL_JoystickGetDeviceGUID_renamed_SDL_GetJoystickDeviceGUID
|
||||
#define SDL_JoystickGetDeviceInstanceID SDL_JoystickGetDeviceInstanceID_renamed_SDL_GetJoystickDeviceInstanceID
|
||||
#define SDL_JoystickGetDevicePlayerIndex SDL_JoystickGetDevicePlayerIndex_renamed_SDL_GetJoystickDevicePlayerIndex
|
||||
#define SDL_JoystickGetDeviceProduct SDL_JoystickGetDeviceProduct_renamed_SDL_GetJoystickDeviceProduct
|
||||
#define SDL_JoystickGetDeviceProductVersion SDL_JoystickGetDeviceProductVersion_renamed_SDL_GetJoystickDeviceProductVersion
|
||||
#define SDL_JoystickGetDeviceType SDL_JoystickGetDeviceType_renamed_SDL_GetJoystickDeviceType
|
||||
#define SDL_JoystickGetDeviceVendor SDL_JoystickGetDeviceVendor_renamed_SDL_GetJoystickDeviceVendor
|
||||
#define SDL_JoystickGetFirmwareVersion SDL_JoystickGetFirmwareVersion_renamed_SDL_GetJoystickFirmwareVersion
|
||||
#define SDL_JoystickGetGUID SDL_JoystickGetGUID_renamed_SDL_GetJoystickGUID
|
||||
#define SDL_JoystickGetGUIDFromString SDL_JoystickGetGUIDFromString_renamed_SDL_GetJoystickGUIDFromString
|
||||
#define SDL_JoystickGetGUIDString SDL_JoystickGetGUIDString_renamed_SDL_GetJoystickGUIDString
|
||||
#define SDL_JoystickGetHat SDL_JoystickGetHat_renamed_SDL_GetJoystickHat
|
||||
#define SDL_JoystickGetPlayerIndex SDL_JoystickGetPlayerIndex_renamed_SDL_GetJoystickPlayerIndex
|
||||
#define SDL_JoystickGetProduct SDL_JoystickGetProduct_renamed_SDL_GetJoystickProduct
|
||||
#define SDL_JoystickGetProductVersion SDL_JoystickGetProductVersion_renamed_SDL_GetJoystickProductVersion
|
||||
#define SDL_JoystickGetSerial SDL_JoystickGetSerial_renamed_SDL_GetJoystickSerial
|
||||
#define SDL_JoystickGetType SDL_JoystickGetType_renamed_SDL_GetJoystickType
|
||||
#define SDL_JoystickGetVendor SDL_JoystickGetVendor_renamed_SDL_GetJoystickVendor
|
||||
#define SDL_JoystickInstanceID SDL_JoystickInstanceID_renamed_SDL_GetJoystickInstanceID
|
||||
#define SDL_JoystickIsVirtual SDL_JoystickIsVirtual_renamed_SDL_IsJoystickVirtual
|
||||
#define SDL_JoystickName SDL_JoystickName_renamed_SDL_GetJoystickName
|
||||
#define SDL_JoystickNameForIndex SDL_JoystickNameForIndex_renamed_SDL_GetJoystickNameForIndex
|
||||
#define SDL_JoystickNumAxes SDL_JoystickNumAxes_renamed_SDL_GetNumJoystickAxes
|
||||
#define SDL_JoystickNumButtons SDL_JoystickNumButtons_renamed_SDL_GetNumJoystickButtons
|
||||
#define SDL_JoystickNumHats SDL_JoystickNumHats_renamed_SDL_GetNumJoystickHats
|
||||
#define SDL_JoystickOpen SDL_JoystickOpen_renamed_SDL_OpenJoystick
|
||||
#define SDL_JoystickPath SDL_JoystickPath_renamed_SDL_GetJoystickPath
|
||||
#define SDL_JoystickPathForIndex SDL_JoystickPathForIndex_renamed_SDL_GetJoystickPathForIndex
|
||||
#define SDL_JoystickRumble SDL_JoystickRumble_renamed_SDL_RumbleJoystick
|
||||
#define SDL_JoystickRumbleTriggers SDL_JoystickRumbleTriggers_renamed_SDL_RumbleJoystickTriggers
|
||||
#define SDL_JoystickSendEffect SDL_JoystickSendEffect_renamed_SDL_SendJoystickEffect
|
||||
#define SDL_JoystickSetLED SDL_JoystickSetLED_renamed_SDL_SetJoystickLED
|
||||
#define SDL_JoystickSetPlayerIndex SDL_JoystickSetPlayerIndex_renamed_SDL_SetJoystickPlayerIndex
|
||||
#define SDL_JoystickSetVirtualAxis SDL_JoystickSetVirtualAxis_renamed_SDL_SetJoystickVirtualAxis
|
||||
#define SDL_JoystickSetVirtualButton SDL_JoystickSetVirtualButton_renamed_SDL_SetJoystickVirtualButton
|
||||
#define SDL_JoystickSetVirtualHat SDL_JoystickSetVirtualHat_renamed_SDL_SetJoystickVirtualHat
|
||||
#define SDL_JoystickUpdate SDL_JoystickUpdate_renamed_SDL_UpdateJoysticks
|
||||
#define SDL_NumJoysticks SDL_NumJoysticks_renamed_SDL_GetNumJoysticks
|
||||
|
||||
/* ##SDL_keycode.h */
|
||||
#define KMOD_ALT KMOD_ALT_renamed_SDL_KMOD_ALT
|
||||
#define KMOD_CAPS KMOD_CAPS_renamed_SDL_KMOD_CAPS
|
||||
|
||||
Reference in New Issue
Block a user