include/SDL_joystick.h
changeset 10855 fc18eb831c08
parent 10752 c9d3ff50dfcf
child 10865 179bcbe6c911
     1.1 --- a/include/SDL_joystick.h	Wed Jan 25 22:24:54 2017 -0800
     1.2 +++ b/include/SDL_joystick.h	Fri Jan 27 05:59:58 2017 -0800
     1.3 @@ -75,6 +75,19 @@
     1.4  
     1.5  typedef enum
     1.6  {
     1.7 +    SDL_JOYSTICK_TYPE_UNKNOWN,
     1.8 +    SDL_JOYSTICK_TYPE_GAMECONTROLLER,
     1.9 +    SDL_JOYSTICK_TYPE_WHEEL,
    1.10 +    SDL_JOYSTICK_TYPE_ARCADE_STICK,
    1.11 +    SDL_JOYSTICK_TYPE_FLIGHT_STICK,
    1.12 +    SDL_JOYSTICK_TYPE_DANCE_PAD,
    1.13 +    SDL_JOYSTICK_TYPE_GUITAR,
    1.14 +    SDL_JOYSTICK_TYPE_DRUM_KIT,
    1.15 +    SDL_JOYSTICK_TYPE_ARCADE_PAD,
    1.16 +} SDL_JoystickType;
    1.17 +
    1.18 +typedef enum
    1.19 +{
    1.20      SDL_JOYSTICK_POWER_UNKNOWN = -1,
    1.21      SDL_JOYSTICK_POWER_EMPTY,
    1.22      SDL_JOYSTICK_POWER_LOW,
    1.23 @@ -125,6 +138,12 @@
    1.24  extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);
    1.25  
    1.26  /**
    1.27 + *  Get the type of a joystick, if available.
    1.28 + *  This can be called before any joysticks are opened.
    1.29 + */
    1.30 +extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index);
    1.31 +
    1.32 +/**
    1.33   *  Open a joystick for use.
    1.34   *  The index passed as an argument refers to the N'th joystick on the system.
    1.35   *  This index is not the value which will identify this joystick in future
    1.36 @@ -170,6 +189,11 @@
    1.37  extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick * joystick);
    1.38  
    1.39  /**
    1.40 + *  Get the type of an opened joystick.
    1.41 + */
    1.42 +extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick * joystick);
    1.43 +
    1.44 +/**
    1.45   *  Return a string representation for this guid. pszGUID must point to at least 33 bytes
    1.46   *  (32 for the string plus a NULL terminator).
    1.47   */