mojira.dev

Nat Brown (Apple)

Assigned

No issues.

Reported

No issues.

Comments

suspect but not certain that this is crashing because glfw is assuming the type of some IOHIDDeviceGetProperty requests in glfw/src/cocoa_joystick.m and calling CFStringGetCString(), CFNumberGetValue(), and IOHIDValueGetIntegerValue() on CFTypeRef and CFValueRef objects of the wrong type. places such as https://github.com/glfw/glfw/blob/33cd8b865d9289cfbcf3d95e6e68e4050b94fcd3/src/cocoa_joystick.m#L146-L155 might be better written as:

if (property && CFGetTypeID(property) == CFStringGetTypeID()) { ... }

and similarly

if (property && CFGetTypeID(property) == CFNumberGetTypeID())
        CFNumberGetValue(property, kCFNumberSInt32Type, &vendor);

Can you share the Apple Feedback ID you created for this issue? My team supports game controllers at Apple and would like to track this issue down.