Closed Bug 894382 Opened 10 years ago Closed 10 years ago
[Gamepad] Support libudev
Currently if you don't have libudev installed, the Linux Gamepad backend just fails to find any Gamepad devices. This kind of sucks since apparently it's not installed by default on Ubuntu (and maybe other distros). We can fall back to a much crappier "scan the filesystem for /dev/input/js*" code path if we don't have libudev, which would be better than nothing.
After installing a fresh Ubuntu 13.04, I found that libudev was installed, so maybe that's a red herring. I did notice (after Chris Coulson pointed it out), that the binary version has been bumped, so it's libudev.so.1, and my code only looks for libudev.so.0. This would result in the same behavior, but it's much simpler to fix.
This indeed appears to be the case. It looks like the ABI change didn't actually change anything we're using: https://lists.fedoraproject.org/pipermail/devel/2012-June/168227.html so it should be okay to just try to load both libraries in turn. I have a patch for this, I'll spin a try build so we can test.
Summary: [Gamepad] Support fallback for Linux systems without libudev → [Gamepad] Support libudev.so.1
This seems to work fine on my Ubuntu 12.04 system (which has libudev.so.0). I'll try it on my 13.04 VM as well. I've also pushed it to Try as a sanity check, and to get some builds that QA can use to test: https://tbpl.mozilla.org/?tree=Try&rev=758fa557e127
Attachment #777835 - Flags: review?(karlt)
Attachment #777835 - Flags: review?(karlt) → review+
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20130718 Firefox/24.0 It works just fine with the try build (20130718083050) on Ubuntu 13.04 x32.
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20130718 Firefox/24.0 WFM also on Ubuntu 12.10 x64 (with libudev.so.0).
Alexandra: thanks for the testing!
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.