Input broken --without-libudev

Hi,

I am trying to port SDL2 to a X11-less device. I went berserk and added
a “fbdev” video backend (which doesn’t have much to see with fbdev
actually, it’s more a wrapper around EGL with a hardcoded 320x240 mode).
See https://github.com/pcercuei/SDL2

My problem is that if I configure SDL2 to use evdev but without libudev,
I don’t receive any events.

Looking at src/core/linux/SDL_evdev.c it makes sense since device
structures are added to the linked list “_this->first” only if
SDL_USE_LIBUDEV is set.

It would be nice to either provide an alternative to udev (by scanning
/dev/input/eventX for instance) or to make the selection of evdev
require libudev.

Regards,
Paul

Yup, having evdev require udev is probably reasonable at this point.

Patch? :)On Wed, May 14, 2014 at 2:08 AM, Paul Cercueil wrote:

Hi,

I am trying to port SDL2 to a X11-less device. I went berserk and added
a “fbdev” video backend (which doesn’t have much to see with fbdev
actually, it’s more a wrapper around EGL with a hardcoded 320x240 mode).
See https://github.com/pcercuei/SDL2

My problem is that if I configure SDL2 to use evdev but without libudev, I
don’t receive any events.

Looking at src/core/linux/SDL_evdev.c it makes sense since device
structures are added to the linked list “_this->first” only if
SDL_USE_LIBUDEV is set.

It would be nice to either provide an alternative to udev (by scanning
/dev/input/eventX for instance) or to make the selection of evdev
require libudev.

Regards,
Paul


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I’m with Sam on that front. Joysticks, for one, don’t work as
expected on Linux without udev. At this point I consider the
non-udev path to be about the same as mingw32 (non mingw-w64)
toolchain builds: It ought to compile, but SDL is going to be
crippled by your build choice.

JosephOn Thu, May 15, 2014 at 11:41:27PM -0700, Sam Lantinga wrote:

Yup, having evdev require udev is probably reasonable at this point.

Patch? :slight_smile:

On Wed, May 14, 2014 at 2:08 AM, Paul Cercueil wrote:

Hi,

I am trying to port SDL2 to a X11-less device. I went berserk and added
a “fbdev” video backend (which doesn’t have much to see with fbdev
actually, it’s more a wrapper around EGL with a hardcoded 320x240 mode).
See https://github.com/pcercuei/SDL2

My problem is that if I configure SDL2 to use evdev but without libudev, I
don’t receive any events.

Looking at src/core/linux/SDL_evdev.c it makes sense since device
structures are added to the linked list “_this->first” only if
SDL_USE_LIBUDEV is set.

It would be nice to either provide an alternative to udev (by scanning
/dev/input/eventX for instance) or to make the selection of evdev
require libudev.

Regards,
Paul


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

hi i have some questions:

do you build SDL2 withjout udev and have (apart of joistickl) working devices if are already detected?