Clarify requirements for receiving joystick events

As of c5694b3013 this is now consistent
enough across platforms to describe.

Fixes #887.

[ci skip]
master
Camilla Löwy ago%!(EXTRA string=9 years)
parent 6801478a13
commit a46c95c7f2
  1. 6
      docs/input.dox
  2. 6
      include/GLFW/glfw3.h

@ -590,6 +590,12 @@ void joystick_callback(int jid, int event)
}
@endcode
For joystick connection and disconnection events to be delivered on all
platforms, you need to call one of the [event processing](@ref events)
functions. Joystick disconnection may also be detected and the callback
called by joystick functions. The function will then return whatever it
returns for a disconnected joystick.
@section time Time input

@ -4032,6 +4032,12 @@ GLFWAPI const char* glfwGetJoystickName(int jid);
* currently set callback. This is called when a joystick is connected to or
* disconnected from the system.
*
* For joystick connection and disconnection events to be delivered on all
* platforms, you need to call one of the [event processing](@ref events)
* functions. Joystick disconnection may also be detected and the callback
* called by joystick functions. The function will then return whatever it
* returns for a disconnected joystick.
*
* @param[in] cbfun The new callback, or `NULL` to remove the currently set
* callback.
* @return The previously set callback, or `NULL` if no callback was set or the

Loading…
Cancel
Save