[aquaria] Implemented Rumble Support for Aquaria under Linux

Mathias Panzenböck grosser.meister.morti at gmx.net
Wed Jun 16 07:20:09 EDT 2010


I already sent this message to a bunch of people which I found in the commit logs, but I thought I 
also send it to the mailing list (now that I was told where I could find the mailing list).

I implemented rumble support for Aquaria under Linux. Because SDL does not support rumbling this is 
a tiny bit hacky. Under Linux a different device is used for reading joystick input and playing 
effects (such as rumbling). With this patch you just need to set an environment variable to the 
device file which should be used for rumbling. I called the environment variable 
AQUARIA_EVENT_JOYSTICKX, where the X is the number of the joystick.

Example usage:
export AQUARIA_EVENT_JOYSTICK0=/dev/input/event6

It would be nice if there where a way to automatically map the joystick to the correct device file, 
but I didn't find one (I'm new to all this and I didn't google for long, so maybe there is a way).

This are all the changes I made:

(I see that the Joystick class has no destructor or other kind of cleanup method so the opened file 
descriptors are never closed - well except on exit, which should be good enough for a game, I guess.)

It seems to work great for me (Fedora Linux 12 x86_64, Xbox 360 Gamepad). Though I'm not sure if 
it's the right rumble experience, because I use Linux only.

BitBucket project (and also clone URL):


More information about the aquaria mailing list