godot icon indicating copy to clipboard operation
godot copied to clipboard

Nintendo Switch Pro Controller USB inputs are erratic w/ Steam

Open ace24713 opened this issue 4 years ago • 4 comments

Godot version: 3.3 rc8

OS/device including version: Windows 10

Issue description: Under specific configurations, godot interprets the controller as sending many random inputs.

I'm not pressing anything at all: pro_controller

From my basic googling of the issue, it seems that there's a problem with Steam's "Switch Pro Configuration Support" where the DirectInput freaks out when Steam enables gyro on a Pro Controller over USB. I don't have a great source for this, but this discussion has a post from a Valve employee that describes what I just said.

While this itself isn't Godot's fault, it seems the problem does not effect apps that use XInput to read controller inputs. I'm a bit out of the loop, but I did think Godot supports XInput, so I'm wondering why this is messing up?

For the record, from the discussion I linked above adding the project exe as a non-steam game is a workaround. Seems like steam forces the game to use XInput in some way, as the controller is no longer reported as a "Nintendo Switch Pro Controller" but instead as an "XInput Gamepad"

Additionally I've heard about similar problems with DS4 controllers and Steam's "PlayStation Configuration Support" option, but I don't own one of those so I can't try it.

Steps to reproduce: Steam must be running, with "Switch Pro Configuration Support" enabled in the Controller Settings menu. A Nintendo Switch Controller must be plugged in via USB. You should be able to move the mouse with the right thumbstick if it detected it. The problem is NOT reproducible when using Bluetooth.

Launch any godot game with joypad inputs the joypads demo project works well

(To my knowledge it is irrelevant if the controller is plugged in before or after steam is started. And steam must be closed AND the controller unplugged to reset it)

Minimal reproduction project: I've been using the joypads demo project to test

ace24713 avatar Apr 14 '21 00:04 ace24713

As @Zireael07 mentioned in my issue #47892, these issues seem related. If that is the case your suspicion with the DS4 controller is correct. However i did not have steam running in the background (but i have used "PlayStation Configuration Support" on my computer in the past), and the problem persisted with Bluetooth on the DS4. And since XInput is windows proprietary software, and i am on Linux, that is not causing the issue in my case.

Samdal avatar Apr 14 '21 18:04 Samdal

From what i am seeing: procontroller Buttons 1 to 8 flicker on and off in a binary pattern. It looks like it's looping from 0 to 255 constantly.

Evangeder avatar Dec 12 '23 09:12 Evangeder

I have the same issue. Here are my notes on where I have had that same issue:

  • Unity old input system editor
  • Games that use unity old input system
  • Godot (3.3 & 4.2, Windows & Mac) Interestingly enough there are a few places where the controller does work correctly.
  • Unity's new input system
  • An impact JS game (CrossCode)

SentientDragon5 avatar Jul 11 '24 21:07 SentientDragon5

I also encountered the same issue in Godot 4.3 stable version, but in some Unity games, the controller works correctly.

gongbaoqi avatar Aug 17 '24 01:08 gongbaoqi

Related / duplicate of https://github.com/godotengine/godot/issues/44840, where the controller also only malfunctions when using wired

MJacred avatar Apr 20 '25 10:04 MJacred

Can still reproduce this in v4.4.1.stable.steam [49a5bc7b6].

Yolwoocle avatar May 09 '25 18:05 Yolwoocle

This video shows a Nintendo Switch Pro Controller connected via USB, on Windows 11. Steam is NOT running.

https://github.com/user-attachments/assets/21c4c2e9-c9dc-4bfa-a2bd-0222d0d5d883

When connected via Bluetooth, the controller is detected by Godot but no input is registered.

This issue also happens on 4.4.1.stable.official.

Any chance of this being fixed? The issue is from 2021 and it seems like a lot people might want to support Nintendo Switch controllers...

Yolwoocle avatar May 09 '25 18:05 Yolwoocle

I can still reproduce this on 4.5.beta.2 with my 8BitDo Ultimate 2C Bluetooth controller which is recognized as a Nintendo Switch Pro Controller by both Steam and the Joypads demo. Tested this on multiple computers- no change in behavior from 4.4.1.stable. Wired connection is still producing the erratic inputs while a wireless connection is fine. The controller works fine in both cases within Steam. This occurs regardless of whether or not Steam is running. Not sure whether SDL3 actually fixed this or not for the official Nintendo controller, I don't have one on hand to test with.

AbsoluteMoose avatar Jul 02 '25 20:07 AbsoluteMoose

Just had the chance to test with an official controller- no change for that either. It doesn't seem like #106218 actually fixes this issue in any way.

AbsoluteMoose avatar Jul 05 '25 17:07 AbsoluteMoose

That's weird, because when Calinou was testing my PR the issue seemed to be fixed: https://github.com/godotengine/godot/pull/106218#pullrequestreview-2840499941

Nintorch avatar Jul 05 '25 19:07 Nintorch

I just did a bit more testing. All of my previous testing had been done with the .NET version of the engine, but I just tried using the standard version and the controllers are now working as intended (even on the same project file). It seems like the issue is exclusive to .NET builds of the engine. I'll make a separate issue since it seems like the core problem has indeed been fixed.

AbsoluteMoose avatar Jul 05 '25 19:07 AbsoluteMoose

That's good to hear :) I think the problem is actually that, for some reason, links to .NET builds for beta 2 led to beta 1 builds, but it should now be fixed (there's a pinned Github issue for that)

Nintorch avatar Jul 05 '25 20:07 Nintorch

That would explain it. Just tested again after re-downloading the .NET build and everything is fixed. Thanks for the help- hadn't noticed that issue.

AbsoluteMoose avatar Jul 05 '25 20:07 AbsoluteMoose

I wanted to report having this issue in Windows with Godot 4.4

erobinson-1997 avatar Aug 28 '25 04:08 erobinson-1997