[haiku-development] Re: Joysticks in Haiku

  • From: "Carwyn" <cdj1000@xxxxxxx>
  • To: "Haiku-dev" <haiku-development@xxxxxxxxxxxxx>
  • Date: Mon, 14 Mar 2011 01:38:54 +0000

Here are my current shenanigans with the usb_hid and joystick after 
reading mmlr's post on dev.haiku,  with these modifications it is now 
possible to find out a device type by using the following,

HIDCollection *collection = device->Parser()->RootCollection();
if(collection->UsagePage() != B_HID_USAGE_PAGE_GENERIC_DESKTOP
                || collection->UsageID() != B_HID_UID_GD_GAMEPAD) return NULL;

I'm uploading my usb_hid folder so that someone could have a look and 
see if these changes are acceptable or if there are any drawbacks to 
this method.  I do have a gamepad working at the moment with the new 
GamepadDevice.cpp in the zip file.

Carwyn




<<< application/x-be_attribute; name="BeOS Attributes": Unrecognized >>>

Other related posts: