<div dir="ltr">As a hobby game dev, what follows is a description of my dream input system.<div style><br></div><div style>Apart from the existing input protocol...</div><div><br></div><div>I would expect Wayland to support a protocol that can enumerate input devices and discover capabilities regardless of type. What follows that wayland has a sensible set of i/o primitives (delta, vector, absolute, quaternion, buttonset, rumble).</div>
<div>These should be coupled with metadata that makes applications display sensible information about keybindings (ex. movement format mapped to Left Stick Y).</div><div><div><br></div><div>The compositor in turn might require a whole slew of drivers (or very few) to support all the different variations out there under this protocol.</div>
</div><div style>Conflicts and priority needs to be handled since one driver might be very generic (generic gamepad) while another specialized (Xbox 360 Controller)</div><div style><br></div><div style>Now I have little to no idea how an input model like this would manifest itself in a library like SDL.</div>
<div style><br></div><div style>My five cents.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 21, 2013 at 2:14 PM, Martin Minarik <span dir="ltr"><<a href="mailto:minarik11@student.fiit.stuba.sk" target="_blank">minarik11@student.fiit.stuba.sk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Todd<br>
<div class="im"><br>
<br>
> That's a complete controller state in 32 bytes. The<br>
analog values<br>
> in actual hardware are usually actually returned as<br>
unsigned byte<br>
> values, but from a protocol point of view converting<br>
each stick axis<br>
> to the range [-1.0f .. 1.0f] and the triggers to [0.0f<br>
.. 1.0f] is<br>
> saner. If Wayland just delivers that data it will cover<br>
most needs.<br>
<br>
</div>I disagree with inventing a new protocol. The joypad<br>
devices are generally already supported in the linux<br>
kernel[1].<br>
<br>
Pretty much all that device ever does, is to send key and<br>
abs data.<br>
<br>
The protocol is similiar to evdev. We may be able to send<br>
it over<br>
the wayland protocol to the applications in a<br>
straightforward way.<br>
<br>
A special device wl_joypad will be created that will<br>
support button<br>
and abs axis events. It will be delivered to application<br>
that subscribe<br>
to this type of protocol. What do you think?<br>
<br>
References:<br>
<br>
[1] linux/input/input/joystick/xpad.c<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</div></div></blockquote></div><br></div>