I was encountering segmentation faults when running pyglet/examples/input.py on my mac; I was able to come up with a fix: Turns out to be an issue in the darwin_hid module; specifically there is an assumption that the HIDValues are all intvalues. Unfortunately the usb devices had elements with larger HIDValue byte lengths such as the builtin "Apple Internal Keyboard / Trackpad" which has 511 byte and 6 byte HIDValue elements (probably related to multitouch...). Also the "PLAYSTATION(R)3 Controller" has a 39 byte HIDValue element.
Using the IOHIDValueGetLength function, i am able to filter out hidvalues > 4 bytes which would segfault when calling IOHIDValueGetIntegerValue. Note that the carbon_hid module handles the large payload hid_values without segfault; an error is printed out. "error adding AbsoluteAxis(raw_name=1:1)" for the PS3 Controller. -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To view this discussion on the web visit https://groups.google.com/d/msg/pyglet-users/-/8I4BR4x4FnUJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
