mupen64plus / mupen64plus-input-sdl

Input plugin for Mupen64Plus v2.0 project using SDL. This is derived from the original Mupen64 blight_input plugin.
GNU General Public License v2.0
43 stars 70 forks source link

Add input config for Google Stadia controller. #104

Closed dmccombs closed 3 years ago

dmccombs commented 3 years ago

This adds Google Stadia controller support to InputAutoCfg. I'd like feedback though on how I've defined buttons.

Here's what a Stadia controller looks like. It works as a normal HID joystick when plugged in via a USB-C (to USB-A in my case) cable. I'm testing on Linux, I'd be curious if this works correctly on Windows or Mac depending how the controller identifies.

stadia-controller

First, the straight forward ones:

The ones I'm unsure of:

I've left the X, Menu, Capture, Google Assistant, and Options buttons unused, along with the Left and Right analog triggers. Maybe one of these would make more sense for the Z Trig?

I also don't know if the rumble of the Stadia can be controlled in some way by Mupen64, if that's what Rumplepak switch is intended for.

Once I get some feedback on any changes to the mapping, I'll add text to the README describing this controller like the others.

dmccombs commented 3 years ago

@richard42 any thoughts on the button mapping, especially for Z Trig? Could I and should I map the analog L and/or R shoulder triggers to that? I'll open another PR with the README.md and possibly an update for that once I hear back.

richard42 commented 3 years ago

It would be nice to map the screenshot function to the Capture button. There is currently no way to do that with the InputAutoCfg functionality, though you can achieve the same effect on a particular system by mapping the screenshot command to a particular button number on a particular joystick number.

I don't know if haptic feedback (rumble) is supported by your driver for the Stadia controller, but you can find out by looking through the console log after starting up Mupen64Plus with this controller plugged in. If so, it would be good to map the mempak/rumblepak switches.

The Z trigger should probably be mapped to the L2 left trigger.