mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
Added support for joystick button and axis callbacks
This commit is contained in:
parent
3bee851242
commit
f63824b250
@ -465,6 +465,8 @@ struct _GLFWlibrary
|
||||
struct {
|
||||
GLFWmonitorfun monitor;
|
||||
GLFWjoystickfun joystick;
|
||||
GLFWjoystickbuttonfun joystick_button;
|
||||
GLFWjoystickaxisfun joystick_axis;
|
||||
} callbacks;
|
||||
|
||||
// This is defined in the window API's platform.h
|
||||
@ -953,6 +955,22 @@ void _glfwInputDrop(_GLFWwindow* window, int count, const char** names);
|
||||
*/
|
||||
void _glfwInputJoystickChange(int joy, int event);
|
||||
|
||||
/*! @brief Notifies shared code of a joystick button pressed/release action.
|
||||
* @param[in] joy The joystick that had a button pressed or released.
|
||||
* @param[in] button The button that was pressed or released.
|
||||
* @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`.
|
||||
* @ingroup event
|
||||
*/
|
||||
void _glfwInputJoystickButtonState(int joy, int button, int action);
|
||||
|
||||
/*! @brief Notifies shared code of joystick axis motion.
|
||||
* @param[in] joy The joystick that had an axis moved.
|
||||
* @param[in] axis The axis that was moved.
|
||||
* @param[in] value The current position of the axis.
|
||||
* @ingroup event
|
||||
*/
|
||||
void _glfwInputJoystickAxisMoved(int joy, int axis, float value);
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Utility functions
|
||||
|
Loading…
Reference in New Issue
Block a user