Hello-<br><br>The Problem:<br>I had some trouble using a gamepad adapter recently with wine on OSX. It has two gamepads which are set up as two different, but otherwise identical, top level collections in the HID descriptor.  The current joystick driver doesn&#39;t take into account separate top level collections, which results in the following issues:<br>
1)  Buttons from each joystick with identical usage values get sorted into identical locations during insert_sort_button().  This results in losing track of 1/2 the buttons and the last half of the buttons pointing to memory 0, causing an unhanded page fault in get_osx_device_elements_props().<br>
2) If the above problem is bypassed, there is still a collision of usages for the joystick axes, which causes input to behave erratically.<br><br>The Solution:<br>MSDN indicated that top level HID collections are each treated as separate devices internally.  My goal was to implement this behavior in the OSX Joystick driver.<br>
<br>This Patch:<br>Here I add find_osx_top_level() to the file, which is designed to identify top level HID collections.  It is independent from patch [2/3] but required for patch [3/3]<br><br>-Zach Smith<br><br>---<br> dlls/dinput/joystick_osx.c |   33 +++++++++++++++++++++++++++++++++<br>
 1 files changed, 33 insertions(+), 0 deletions(-)<br><br>