Am 08.03.2011 13:38, schrieb Carwyn:
At the moment when an a Gravis Gamepad Pro USB is inserted in Haiku, it is identified as a mouse in usb_hid. The fButtons, fXAxis and fYAxis already have the correct information to use as basic joystick information for a BJoystick, i have created a basic GamepadDevice and modified Joystick cpp and have a Joystick working in Haiku. My question is, is it possible to modify MouseDevice.cpp to not identify Joysticks as Mice, also how can I identify a Gamepad using HIDReportItem, e.g it’s USAGE_PAGE is B_HID_USAGE_PAGE_GENERIC_DESKTOP, but it’s USAGE is of type GAMEPAD . You are right Enrique the usb hid in Haiku seems easy to use.
First of all please don't top-post. I don't understand from your mail what you need help with. Why don't you just modify the code so that it does what you want and provide a patch? You seem to have already figured out how to get to the information you need, it seems it would be a matter of making use of it.
Best regards, -Stephan