[haiku-development] Re: Joysticks in Haiku

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 18 Mar 2011 07:48:11 +0100

Le 18/03/2011 07:33, pete.goodeve@xxxxxxxxxxxx a écrit :

I've looked at his source code, and he essentially had to include a
tailored 'sub-driver' section of code to handle each manufacturer.
I don't see any hope of some user-written control file to describe
all that.  I think in Haiku we can provide add-ons for each, rather
that piling them all into one module, but the basic mess is the same.
If HID is similarly non-conformist, the same would be true there.

HID is pretty ok as far as I can tell.
The problem with the xbox 360 controller is that it's not HID. And it does tell it in it's descriptor, it hass a "vendor specific" device class. It's protocol is close, but not identical to, HID. People are free to do that if they want, sadly.

Microsoft did it on purpose so the xbox can't use regular pc controllers.

For devices advertising themselves as HID, I think everything will go fine at the driver side if done right. The good way is to have a single, generic HID driver, handling tablets, mouses, joysticks, keyboards, anything else, in the same driver. This way, a weird device may have some keyboard buttons, some knobs and some mouse axis, and still work out of the box.

The problem is then mapping all this to input_server events. We want mouse to move te pointer on screen, and keyboard to type letters. But what to do with strange devices that are neither keyboard or mouse ? Where to send the input then ?

Also, what about supporting multi-pointer interraction ? I guess that's an R2 thing, but it may be interesting to think about it.

--
Adrien.

Other related posts: