HTML5-JavaScript-Gamepad-Controller-Library icon indicating copy to clipboard operation
HTML5-JavaScript-Gamepad-Controller-Library copied to clipboard

Linux, Firefox (Nightly 17.0a1 2012-07-17), (old) Logitech Gamepad: different mapping

Open dertseha opened this issue 12 years ago • 4 comments

I've got an older Logitech gamepad, which is reported as "Gamepad #0: 046d-c216-Logitech Logitech Dual Action (logitech)" and looks like this one: http://www.geeks.com/details.asp?invtid=963292-0403 Notable difference to current ones: ABXY buttons are labelled 2314 (and no vibration function)

The button layout for this one is identical to WEBKIT_LOGITECH and is thus mixed up in the current FIREFOX_LOGITECH. Yet there are several factors playing together:

  • I'm using the old gamepad-introductory build of Firefox for testing here, I don't know whether there are more current supporting versions that perhaps have a different mapping
  • It's an older gampead, yet I doubt they changed the button layout

What to do?

dertseha avatar Jun 24 '13 19:06 dertseha

If you could test it in the latest nightly as to see if it was a fault on Mozilla's behalf that would be great. If it isn't, could you send a list of the gamepad specs.

Thanks

JakeChampion avatar Jun 24 '13 20:06 JakeChampion

Thanks for the quick reply. Testing with the newest nightly is a bit tricky. After wading through various bugzilla comments, gamepad API is currently switched off in the builds for 22 and 23: https://bugzilla.mozilla.org/show_bug.cgi?id=604039

I'll have to wait for 24 at least, then it's something to be enabled in about:config ("dom.gamepad.enabled") as per https://bugzilla.mozilla.org/show_bug.cgi?id=851547

I'll try to come back on this when it's available.

dertseha avatar Jun 25 '13 06:06 dertseha

Thanks for the input, I guess there is nothing that can be done on the library side at the moment. Let us know if something progresses and pull requests are welcome :)

kallaspriit avatar Jun 25 '13 06:06 kallaspriit

I've had a quick test with Aurora 24, but apparently the flag is still not in it.

Either way, because of my refactoring in #15 regarding the mapping environment, this makes it easy to handle such specific cases. My idea here: extract the vendor and/or device-IDs from the id string. Both WebKit and Firefox put in the USB IDs into the string, which uniquely identify the devices.

We could enhance the environment filter to sport these IDs - perhaps even drop the type determination all together since the vendor ID is exactly this already.

But before going into this route, I'd like you to re-check the existing logitech mappings. There are doubles in there and I'm a bit sceptical whether they are actually correct. I don't believe that two buttons share the same index.

dertseha avatar Jul 02 '13 17:07 dertseha