dinput: Ignore vendor-specific usage pages for joystick elements on Mac.
Signed-off-by: Bob Ziuchkovski <bob.ziuchkovski@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2de3dc3dd6
commit
221708d64e
|
@ -640,14 +640,20 @@ static void get_osx_device_elements(JoystickImpl *device, int axis_map[8])
|
|||
{
|
||||
IOHIDElementRef element = ( IOHIDElementRef ) CFArrayGetValueAtIndex( elements, idx );
|
||||
int type = IOHIDElementGetType( element );
|
||||
int usage_page = IOHIDElementGetUsagePage( element );
|
||||
|
||||
TRACE("element %s\n", debugstr_element(element));
|
||||
|
||||
if (usage_page >= kHIDPage_VendorDefinedStart)
|
||||
{
|
||||
/* vendor pages can repurpose type ids, resulting in incorrect case matches below (e.g. ds4 controllers) */
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case kIOHIDElementTypeInput_Button:
|
||||
{
|
||||
int usage_page = IOHIDElementGetUsagePage( element );
|
||||
TRACE("kIOHIDElementTypeInput_Button usage_page %d\n", usage_page);
|
||||
if (usage_page != kHIDPage_Button)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue