nirenjan / libx52

Saitek X52/X52pro drivers & controller mapping software for Linux
https://nirenjan.github.io/libx52
GNU General Public License v2.0
115 stars 14 forks source link

Browser support #14

Closed nigeltiany closed 6 years ago

nigeltiany commented 6 years ago

Wondering if this controller is available under navigator.gamepads on any browser with this driver. Can someone with a linux pc and the controller please try it out with any of these websites?

http://html5gamepad.com/ https://gamepadviewer.com/

rogerxxxx commented 6 years ago

If the "navigator gamepad" web interface API simply checks the Linux joystick driver status for each axis or button action, then the default Linux joystick driver should work fine.

I believe this driver is a more customized driver for this Saitek device, allowing user access to the more unnecessary features of the joystick such as LED lighting brightness and colors, as well as LED display.

Regardless, web API should have access. I would check to see if your web API is windows only, or Linux compatible. If it is Linux compatible, I would take a gamble and buy the device with only worrying next if the throttle mapping (or other axis or switch) mapping isn't working correctly. Most API's screw-up the Saitek mode switch, but again usually not a needed function. I would worry more about the throttle axis working properly, as well as most needed buttons/axis. For all I know, the joystick may work flawlessly.

(Personally I just desire or almost need the LED brightness settings, as the default brightness is much too bright. Choosing colors is nice to help remember button mapping, but would imagine users rarely look downwards after some time.)

nirenjan commented 6 years ago

Roger is right - the driver doesn't replace the standard Linux HID driver, but adds user-space APIs to control the MFD and LEDs, which aren't managed by standard USB.

nirenjan commented 6 years ago

It shows up just fine with https://html5gamepad.com, although it's missing a couple of axes - notably the slider and mouse stick on the throttle. All the buttons seem to show up fine though.

With https://gamepadviewer.com, it detects the joystick, but I wasn't able to get the inputs to map to the XBox controller.

Oh, and I checked it on my Macbook, not in Linux, but I would assume that the Gamepad API is generic enough across operating systems to show up in all 3 (Windows, OS X and Linux)

rogerxxxx commented 6 years ago

Sounds about right. If everything works for your needs, consider yourself extremely lucky!

As I think about it, the mouse stick might be configurable as a mouse device under your Linux X/Xorg configuration, as that mouse device typically acts as a replacement of using your usual typical mouse device within a game. Never thought much of it now, as I haven't used the joystick under Linux/X since playing bf1942/wine decades ago. The next latest and greatest is something call "ARMA 3" by Bohemia. But their Linux game version is an extremely slimmed down version of the Windows' version, with joystick usage being apparently unconfigurable/non-detectable via the required Steam. (Or a royal PITA, making it nearly impossible to use.) Last I checked 6 months ago anyways. If this ARMA 3 game ever gets fully working, almost guarenteed to have much more activity with (this) Saitek device support in Linux.

nigeltiany commented 6 years ago

Thanks, @rogerxxxx @nirenjan. I am lucky then, all I need is the throttle, the joystick position including twisting and a few buttons. But then all the buttons work so yay! I don't see and immediate need for the slider on the throttle or the mouse for my case just yet but I know I will in the near future so thanks for the insight.