include/SDL_joystick.h
changeset 11581 49393a9dffe4
parent 10934 380eae4f5059
child 11811 5d94cb6b24d3
     1.1 --- a/include/SDL_joystick.h	Mon Oct 09 11:45:15 2017 -0700
     1.2 +++ b/include/SDL_joystick.h	Tue Oct 10 11:10:15 2017 -0700
     1.3 @@ -106,6 +106,20 @@
     1.4  } SDL_JoystickPowerLevel;
     1.5  
     1.6  /* Function prototypes */
     1.7 +
     1.8 +/**
     1.9 + * Locking for multi-threaded access to the joystick API
    1.10 + *
    1.11 + * If you are using the joystick API or handling events from multiple threads
    1.12 + * you should use these locking functions to protect access to the joysticks.
    1.13 + *
    1.14 + * In particular, you are guaranteed that the joystick list won't change, so
    1.15 + * the API functions that take a joystick index will be valid, and joystick
    1.16 + * and game controller events will not be delivered.
    1.17 + */
    1.18 +extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
    1.19 +extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
    1.20 +
    1.21  /**
    1.22   *  Count the number of joysticks attached to the system right now
    1.23   */