Problem with Joysticks
#1
Hello all!
I'm having a small problem with Joysticks in Linux... hoping someone can help.

I wanted to be able to use Wiimotes with my media center to control XBMC, emulators, etc. In order to do this, I wrote an application which creates four virtual joystick devices using UInput, allowing up to four Wiimotes to be connected. The problem, however, is that XBMC refuses to see updates from these joysticks. I have another joystick attached to my system, which XBMC reads fine, and is able to use, but, even after creating a keymap.xml for the virtual joysticks, nothing happens.

The log seems to recognize the joysticks, but the events from the joysticks simply aren't handled. I found some code to test joysticks in SDL, ran that, and it was able to handle the joysticks without any complaints. I'm running the latest git of XBMC (compiled myself) on Ubuntu 10.10 with all the latest updates.

Any ideas on what could be wrong? I've been working at this for about a day, and just haven't been able to make any progress. Thanks!

[edit]Nevermind! It turns out that in order for SDL to handle joysticks properly, they need an ABS_X and ABS_Y axis. Added these to my code, and everything seems to be working now!
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with Joysticks0