forked from Green-Sky/tomato
Merge commit '852f2a6343518919e5ca8d3c1bbcab9f493e3cd8'
This commit is contained in:
23
external/sdl/SDL/include/SDL3/SDL_joystick.h
vendored
23
external/sdl/SDL/include/SDL3/SDL_joystick.h
vendored
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2024 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
|
||||
@ -22,7 +22,7 @@
|
||||
/**
|
||||
* \file SDL_joystick.h
|
||||
*
|
||||
* \brief Include file for SDL joystick event handling
|
||||
* Include file for SDL joystick event handling
|
||||
*
|
||||
* The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
|
||||
* then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.
|
||||
@ -42,6 +42,7 @@
|
||||
#include <SDL3/SDL_error.h>
|
||||
#include <SDL3/SDL_guid.h>
|
||||
#include <SDL3/SDL_mutex.h>
|
||||
#include <SDL3/SDL_properties.h>
|
||||
|
||||
#include <SDL3/SDL_begin_code.h>
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -342,7 +343,7 @@ typedef struct SDL_VirtualJoystickDesc
|
||||
Uint16 product_id; /**< the USB product ID of this joystick */
|
||||
Uint16 padding; /**< unused */
|
||||
Uint32 button_mask; /**< A mask of which buttons are valid for this controller
|
||||
e.g. (1 << SDL_GAMEPAD_BUTTON_A) */
|
||||
e.g. (1 << SDL_GAMEPAD_BUTTON_SOUTH) */
|
||||
Uint32 axis_mask; /**< A mask of which axes are valid for this controller
|
||||
e.g. (1 << SDL_GAMEPAD_AXIS_LEFTX) */
|
||||
const char *name; /**< the name of the joystick */
|
||||
@ -358,7 +359,7 @@ typedef struct SDL_VirtualJoystickDesc
|
||||
} SDL_VirtualJoystickDesc;
|
||||
|
||||
/**
|
||||
* \brief The current version of the SDL_VirtualJoystickDesc structure
|
||||
* The current version of the SDL_VirtualJoystickDesc structure
|
||||
*/
|
||||
#define SDL_VIRTUAL_JOYSTICK_DESC_VERSION 1
|
||||
|
||||
@ -456,6 +457,20 @@ extern DECLSPEC int SDLCALL SDL_SetJoystickVirtualButton(SDL_Joystick *joystick,
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetJoystickVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value);
|
||||
|
||||
/**
|
||||
* Get the properties associated with a joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_OpenJoystick()
|
||||
* \returns a valid property ID on success or 0 on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern DECLSPEC SDL_PropertiesID SDLCALL SDL_GetJoystickProperties(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent name of a joystick.
|
||||
*
|
||||
|
Reference in New Issue
Block a user