Input and games.

Martin Minarik minarik11 at student.fiit.stuba.sk
Sun Apr 21 05:14:13 PDT 2013


Hello Todd


> That's a complete controller state in 32 bytes. The
analog values
> in actual hardware are usually actually returned as
unsigned byte
> values, but from a protocol point of view converting
each stick axis
> to the range [-1.0f .. 1.0f] and the triggers to [0.0f
.. 1.0f] is
> saner.  If Wayland just delivers that data it will cover
most needs.

I disagree with inventing a new protocol. The joypad
devices are generally already supported in the linux
kernel[1].

Pretty much all that device ever does, is to send key and
abs data.

The protocol is similiar to evdev. We may be able to send
it over
the wayland protocol to the applications in a
straightforward way.

A special device wl_joypad will be created that will
support button
and abs axis events. It will be delivered to application
that subscribe
to this type of protocol. What do you think?

References:

[1] linux/input/input/joystick/xpad.c




More information about the wayland-devel mailing list