SDL/src/core/linux
Sam Lantinga aaec90e5c5 Fixed bug 4789 - Linux accelerometers no longer available as joysticks
Daniel Drake

A long time ago, it was possible to play neverball on Linux using the accelerometer found in HP laptops.

The kernel exposes the accelerometer as a joystick (/dev/input/jsX) as well as an evdev device (/dev/input/eventX). I guess it worked fine when SDL was using the js interface, but then stopped working here: http://hg.libsdl.org/SDL/rev/fdaeea9e7567

Looking at current code which uses udev to discover joysticks, it looks for the udev tag ID_INPUT_JOYSTICK.

However udev's internal input_id logic specifically tags accelerometers as ID_INPUT_ACCELEROMETER and nothing else.

This looks like a good fit for SDL_HINT_ACCELEROMETER_AS_JOYSTICK.
2019-09-06 08:42:54 -07:00
..
SDL_dbus.c dbus: Don't SimulateUserActivity if we're already inhibiting the screensaver. 2019-07-02 09:43:26 -04:00
SDL_dbus.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_evdev.c Fix touch-related compile errors on Linux. 2019-08-04 16:56:40 -03:00
SDL_evdev.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_evdev_kbd.c Removed extraneous fprintf() call 2019-06-17 11:10:20 -07:00
SDL_evdev_kbd.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_evdev_kbd_default_accents.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_evdev_kbd_default_keymap.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_fcitx.c Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_fcitx.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_ibus.c Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_ibus.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_ime.c Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_ime.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_threadprio.c Fixed bug 4667 - Build errors on Linux when building without Threads support 2019-06-17 08:38:33 -07:00
SDL_udev.c Fixed bug 4789 - Linux accelerometers no longer available as joysticks 2019-09-06 08:42:54 -07:00
SDL_udev.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00