Functions

Linux Input Gamepad Devices (Deprecated)
[Source Device Interface]

APIs to provide gamepad::SourceDevice objects based on the linux input event model (see the header file /usr/include/linux/input.h). More...

Collaboration diagram for Linux Input Gamepad Devices (Deprecated):

Functions

smart_ptr< SourceDeviceFactory > gamepad::getLinuxInputSourceDeviceFactory (IN bool wantForceFeedbackAtRiskOfKernelCrash=false)
 Use this method to create a gamepad::SourceDeviceFactory object capable of providing SourceDevice objects from the linux input event API.

Detailed Description

APIs to provide gamepad::SourceDevice objects based on the linux input event model (see the header file /usr/include/linux/input.h).

Note that this source device implementation is no longer used. Unfortunately, that means there is no support for force feedback (rumble) in Linux. I suspect the future of gamepad (including force feedback) is the joystick APIs, since they have a straightforward security model.


Function Documentation

smart_ptr< SourceDeviceFactory > gamepad::getLinuxInputSourceDeviceFactory ( IN bool  wantForceFeedbackAtRiskOfKernelCrash = false  ) 

Use this method to create a gamepad::SourceDeviceFactory object capable of providing SourceDevice objects from the linux input event API.

By default, force feedback effects will be disabled. I've found them to be very unstable. But you can try turning them on in case you think your kernel can handle it. In particular, playing force feedback effects and then unplugging the USB adapter causes the kernel to lock. I've found this happens mostly if you reset force feedback requests often (~100Hz). If you only update force feedback requests in response to user actions (~10Hz) I've found the kernel to be much happier. (To be fair, this is almost certainly a driver bug running in kernel space and not the kernel itself).