Simple Directmedia Layer
Find a file
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
acinclude
android-project Fixed bug 3918 - HIDAPI, CMake support for android project 2019-08-27 11:38:43 +02:00
android-project-ant
build-scripts
cmake
debian
docs Fixed bug 3918 - CMake support for android project 2019-08-11 15:23:37 +02:00
include x11: add a hint to force the VisualID used when creating a window. 2019-09-04 09:27:58 -07:00
src Fixed bug 4789 - Linux accelerometers no longer available as joysticks 2019-09-06 08:42:54 -07:00
test minor warning fixes. 2019-08-04 14:56:02 +03:00
VisualC
VisualC-WinRT
visualtest
wayland-protocols
Xcode fix permissions 2019-08-08 23:35:02 +03:00
Xcode-iOS fix permissions 2019-08-23 03:01:10 +03:00
.hgignore
Android.mk fix permissions 2019-09-05 13:21:02 +03:00
autogen.sh
BUGS.txt
cmake_uninstall.cmake.in
CMakeLists.txt Fixed bug 3918 - HIDAPI, CMake support for android project 2019-08-27 11:38:43 +02:00
configure Disable HIDAPI by default, as it breaks on Linux when trying to use libusb with non-root permissions on some distributions 2019-08-12 13:35:36 -07:00
configure.ac Disable HIDAPI by default, as it breaks on Linux when trying to use libusb with non-root permissions on some distributions 2019-08-12 13:35:36 -07:00
COPYING.txt
CREDITS.txt
INSTALL.txt
Makefile.in Add public APIs for creating a Metal view attached to an SDL window. Add SDL_metal.h. 2019-08-05 12:35:32 -03:00
Makefile.minimal
Makefile.os2 minor warning fixes. 2019-08-04 14:56:02 +03:00
Makefile.pandora
Makefile.psp
Makefile.wiz
README-SDL.txt
README.txt
sdl2-config.cmake.in
sdl2-config.in
sdl2.m4
sdl2.pc.in
SDL2.spec.in
SDL2Config.cmake
TODO.txt
VisualC.html
WhatsNew.txt

                         Simple DirectMedia Layer

                                  (SDL)

                                Version 2.0

---
https://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.

More extensive documentation is available in the docs directory, starting
with README.md

Enjoy!
	Sam Lantinga				(slouken@libsdl.org)