macOS joystick: reduce warnings on some devices
Don’t SG_WARN when we see an unhandled HID page or element, it’s not necessary.
This commit is contained in:
parent
31bb36b347
commit
39f3a83a7e
1 changed files with 9 additions and 6 deletions
13
3rdparty/joystick/jsMacOSX.cxx
vendored
13
3rdparty/joystick/jsMacOSX.cxx
vendored
|
@ -226,6 +226,10 @@ void jsJoystick::open()
|
|||
rv = (*(os->hidDev))->setRemovalCallback(os->hidDev, &joystickRemovalCallback, os, nullptr);
|
||||
|
||||
CFDictionaryRef props = getCFProperties(ioDevices[id]);
|
||||
if (!props) {
|
||||
// TODO ERROR REPORT
|
||||
return;
|
||||
}
|
||||
|
||||
// recursively enumerate all the bits (buttons, axes, hats, ...)
|
||||
CFTypeRef topLevelElement =
|
||||
|
@ -354,9 +358,8 @@ void os_specific_s::parseElement(jsJoystick* joy, CFDictionaryRef element)
|
|||
//printf(" hat\n");
|
||||
/*joy->os->*/addHatElement(joy, (CFDictionaryRef) element);
|
||||
break;
|
||||
|
||||
default:
|
||||
SG_LOG(SG_INPUT, SG_WARN, "input type element has weird usage:" << usage);
|
||||
SG_LOG(SG_INPUT, SG_INFO, "jsJoystick: input type element has unhandled usage:" << usage);
|
||||
break;
|
||||
}
|
||||
} else if (page == kHIDPage_Simulation) {
|
||||
|
@ -368,15 +371,15 @@ void os_specific_s::parseElement(jsJoystick* joy, CFDictionaryRef element)
|
|||
/*joy->os->*/addAxisElement(joy, (CFDictionaryRef) element);
|
||||
break;
|
||||
default:
|
||||
SG_LOG(SG_INPUT, SG_WARN, "Simulation page input type element has weird usage:" << usage);
|
||||
SG_LOG(SG_INPUT, SG_WARN, "jsJoystick: Simulation page input type element has weird usage:" << usage);
|
||||
}
|
||||
} else if (page == kHIDPage_Button) {
|
||||
//printf(" button\n");
|
||||
/*joy->os->*/addButtonElement(joy, (CFDictionaryRef) element);
|
||||
} else if (page == kHIDPage_PID) {
|
||||
SG_LOG(SG_INPUT, SG_WARN, "Force feedback and related data ignored");
|
||||
SG_LOG(SG_INPUT, SG_INFO, "jsJoystick: Force feedback and related data ignored");
|
||||
} else
|
||||
SG_LOG(SG_INPUT, SG_WARN, "input type element has weird usage:" << usage);
|
||||
SG_LOG(SG_INPUT, SG_INFO, "jsJoystick: input type element has unhnadled HID page:" << page);
|
||||
break;
|
||||
|
||||
case kIOHIDElementTypeCollection:
|
||||
|
|
Loading…
Add table
Reference in a new issue