mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 16:30:45 +00:00
Fix joystick user pointer NULL during disconnect
The joystick code did not distinguish between the allocation status of the GLFW joystick object and whether it is connection to an OS level joystick object. These are now tracked separately. Fixes #2092 This is adapted to 3.3-stable from2c204ab52eandfd7e737216.
This commit is contained in:
+2
-1
@@ -478,7 +478,8 @@ struct _GLFWmapping
|
||||
//
|
||||
struct _GLFWjoystick
|
||||
{
|
||||
GLFWbool present;
|
||||
GLFWbool allocated;
|
||||
GLFWbool connected;
|
||||
float* axes;
|
||||
int axisCount;
|
||||
unsigned char* buttons;
|
||||
|
||||
Reference in New Issue
Block a user