Hi,
Without wishing to extend this thread too far - as well as the buttons
on X52 problem (ie more than 32) there was also a problem with X45 not
having its "dial" recognised so I added patch to jsMacOSX.cxx :
if (page == kHIDPage_GenericDesktop) {
switch (usage) /* look at usage to determine function */
{
case kHIDUsage_GD_X:
case kHIDUsage_GD_Y:
case kHIDUsage_GD_Z:
case kHIDUsage_GD_Rx:
case kHIDUsage_GD_Ry:
case kHIDUsage_GD_Rz:
case kHIDUsage_GD_Slider: // for throttle / trim controls
case kHIDUsage_GD_Dial:
//printf(" axis\n");
/*joy->os->*/addAxisElement(joy, (CFDictionaryRef) element);
break;
case kHIDUsage_GD_Hatswitch:
//printf(" hat\n");
/*joy->os->*/addHatElement(joy, (CFDictionaryRef) element);
break;
default:
ulSetError(UL_WARNING, "input type element has weird usage
(%lx)\n", usage);
whether this was the case on other platforms I dont know! It does show
that more advanced joysticks have facilities that may have to be
tailored!! - we may need to recognise GD_Wheel as well for instance.
The HIDusage tables on the Mac do give a pointer to the range of
possibilities (including a special section for simulation) - see "HID
Usage Tables" specification:
http://www.usb.org/developers/hidpage/#Class_Definition
under "GenericDesktop" and "Simulation" pages.
cheers
Jim
|