[haiku-development] Re: Joysticks in Haiku

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 11 Mar 2011 11:36:11 +0100

Hi,

Am 09.03.2011 22:32, schrieb Carwyn:
Maybe i'm not explaining my question properly,  my question is about
how to access the Reports in usb_hid,  at the moment as you know you
can get the xAxis for a usb device as follows,

HIDReportItem *xAxis = report-
FindItem(B_HID_USAGE_PAGE_GENERIC_DESKTOP, B_HID_UID_GD_X);

Now we have the xAxis for a Gamepad,  but the problem is how to detect
what type of device is connected,  I would like to use the existing
usb_hid code as is,  because it gives us access to what we need already
and there is no need to write a seperate driver.  Do you think it's
possible to modify the Parser so we can access the device's USAGE
paramater.  By getting the possibilty of knowing the device's usage
paramater it would stop MouseDevice detecting Gamepads as a mouse.

Michael Lotz, the author of the usb_hid driver, has just provided some directions on how to change the driver to do what you need. See this comment:

http://dev.haiku-os.org/ticket/7354#comment:4

I am afraid it will not be possible to do what you need without these changes to the usb_hid driver. Someone just needs to do the work. Personally, I think it's never a bad idea if that is someone who feels the pressure/need and thus the motivation. :-)

Best regards,
-Stephan

Other related posts: