<div dir="ltr">Well, SDL already opens your gamepad evdev device manually. libinput is designed for compositors and Wayland, and I don't see any reason to introduce a gamepad protocol into Wayland if SDL already just uses evdev.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 25, 2014 at 8:41 AM, Derek Foreman <span dir="ltr"><<a href="mailto:derekf@osg.samsung.com" target="_blank">derekf@osg.samsung.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 25/11/14 04:32 AM, Peter Hutterer wrote:<br>
> On Tue, Nov 25, 2014 at 02:33:53AM +0100, Krzysztof A. Sobiecki wrote:<br>
>> This patch allows libinput to ignore devices that have joystick buttons.<br>
>><br>
>> Signed-off-by: Krzysztof Sobiecki <<a href="mailto:sobkas@gmail.com">sobkas@gmail.com</a>><br>
>> ---<br>
>> src/evdev.c | 9 +++++++++<br>
>> 1 file changed, 9 insertions(+)<br>
>><br>
>> diff --git a/src/evdev.c b/src/evdev.c<br>
>> index 36c6859..5f6cc32 100644<br>
>> --- a/src/evdev.c<br>
>> +++ b/src/evdev.c<br>
>> @@ -1274,6 +1274,15 @@ evdev_configure_device(struct evdev_device *device)<br>
>> has_keyboard = 0;<br>
>> has_touch = 0;<br>
>><br>
>> + for (i = BTN_JOYSTICK; i < BTN_DIGI; i++) {<br>
>> + if (libevdev_has_event_code(evdev, EV_KEY, i)) {<br>
>> + log_info(libinput,<br>
>> + "input device '%s', %s is a joystick, ignoring\n",<br>
>> + device->devname, device->devnode);<br>
>> + return -1;<br>
>> + }<br>
>> + }<br>
>> +<br>
>> if (libevdev_has_event_type(evdev, EV_ABS)) {<br>
>><br>
>> if ((absinfo = libevdev_get_abs_info(evdev, ABS_X))) {<br>
>> --<br>
>> 2.2.0.rc0.207.ga3a616c<br>
><br>
> merged with a minor change, device->devnode is just devnode in my local<br>
> tree. thanks.<br>
<br>
<br>
</div></div>Err, is there some long term plan for gamepad support in libinput? I'm<br>
kind of hoping this isn't it... :)<br>
<br>
I kind of wonder if gamepads should be implicitly assigned seats<br>
(player1, player2, etc) and the compositor can choose whether to ignore<br>
them?<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<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><br clear="all"><br>-- <br><div class="gmail_signature"> Jasper<br></div>
</div>