X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=misc%2Fbuildfiles%2Fosx%2FXonotic.app%2FContents%2FFrameworks%2FSDL2.framework%2FVersions%2FA%2FHeaders%2FSDL_joystick.h;h=266f3b3871d312b4c5155b5ad92602a80f5cfa0f;hp=b0b1c6673f4026d18dd22529e35056751b3738c5;hb=27137e7dcaa767683058a48f2a10552ce4c592e6;hpb=d4d74c9a52cc233ee3a305d21ee0c2e12f935830 diff --git a/misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h b/misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h index b0b1c667..266f3b38 100644 --- a/misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h +++ b/misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2014 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -71,6 +71,16 @@ typedef struct { typedef Sint32 SDL_JoystickID; +typedef enum +{ + SDL_JOYSTICK_POWER_UNKNOWN = -1, + SDL_JOYSTICK_POWER_EMPTY, + SDL_JOYSTICK_POWER_LOW, + SDL_JOYSTICK_POWER_MEDIUM, + SDL_JOYSTICK_POWER_FULL, + SDL_JOYSTICK_POWER_WIRED, + SDL_JOYSTICK_POWER_MAX +} SDL_JoystickPowerLevel; /* Function prototypes */ /** @@ -87,14 +97,20 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index); /** * Open a joystick for use. - * The index passed as an argument refers tothe N'th joystick on the system. - * This index is the value which will identify this joystick in future joystick - * events. + * The index passed as an argument refers to the N'th joystick on the system. + * This index is not the value which will identify this joystick in future + * joystick events. The joystick's instance id (::SDL_JoystickID) will be used + * there instead. * * \return A joystick identifier, or NULL if an error occurred. */ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index); +/** + * Return the SDL_Joystick associated with an instance id. + */ +extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID joyid); + /** * Return the name for this currently opened joystick. * If no name can be found, this function returns NULL. @@ -189,7 +205,7 @@ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick, */ /* @{ */ #define SDL_HAT_CENTERED 0x00 -#define SDL_HAT_UP 0x01 +#define SDL_HAT_UP 0x01 #define SDL_HAT_RIGHT 0x02 #define SDL_HAT_DOWN 0x04 #define SDL_HAT_LEFT 0x08 @@ -241,6 +257,10 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, */ extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick); +/** + * Return the battery level of this joystick + */ +extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick * joystick); /* Ends C function definitions when using C++ */ #ifdef __cplusplus