Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A D-Pad button presses two buttons for Gamecube controllers / joysticks and Mayflash adaptors #21550

Open
sdhy opened this issue Aug 28, 2018 · 15 comments

Comments

@sdhy
Copy link

sdhy commented Aug 28, 2018

Godot version:
3.0.6

OS/device including version:
Mac OS X El Capitan
Version 10.11.6 (15G20015)

Issue description:
When I use a Nintendo Gamecube controller that’s connected to a USB Mayflash adaptor, pressing only one d-pad button at a time results in multiple buttons being pressed at the same time.

Here’s what the Output says when I press each button and print out which button was pressed:

Pressing left on the d-pad:
Output prints: Controller pressed buttons #15,#14,#15 and #14.
I was expecting it to only say one of these numbers, and only once per button press.

Pressing down: Output prints: #14,13,14 and 13
Same expectation.

Pressing Right: Prints 13, 13, 15 and 15.

Pressing up: Prints 12 and 12.
I don’t think it’s because I pressed the button for too long because I can press any other button only once with ease.

Tested with two different Gamecube controllers,
one of them is 1st party from Nintendo,
the other is a third party “SUPERPAD” from InterAct.
Both controller D-pads work fine when tested with Joystick and Gamepad Tester:
https://download.freedownloadmanager.org/Mac-OS/Joystick-And-Gamepad-Tester/FREE-7.1.html

Steps to reproduce:
Plug in a Gamecube controller into a USB Mayflash adaptor.
Plug the adaptor into an iMac (Intel).

Run attached Godot Project.
Run the scene.
Press D-pad buttons one at a time and read the Output messages provided by the autoloaded script.

You can also test any other USB joystick.

Note: the script is autoloaded. It automatically detects which gamecube controller is pushing buttons. Without it, button testing might not work because: simply using Input.is_joy_button_pressed(0, 12) might not work since the active gamecube controller # is always random each time you run the scene.

Please fix. Thank you!

Minimal reproduction project:
See attached zip file.
GamecubeControllerTest.zip

If the project doesn't work, please make a new one with a scene and set the project to autoload this script:

buttonTest.gd.zip

@akien-mga
Copy link
Member

CC @Hinsbart

@sdhy
Copy link
Author

sdhy commented Sep 18, 2018

Any progress on this issue? My target market will likely include gamers with Gamecube controllers with iGPUs, so if this is fixed in stable Godot 3.1 with GLES 2, that'd be amazing!

@vnen
Copy link
Member

vnen commented Sep 18, 2018

Well, it's quite a specific setup (GameCube controller on macOS). So if no one else has the setup then there's no one who can reproduce the issue to understand the cause and fix it.

It would be nice if you can test with other controllers and the same controller on another OS. Maybe the problem is broader and easier to reproduce.

@williamd1k0
Copy link
Contributor

I have GameCube controllers and an USB Mayflash Adapter but I can try to reproduce it only on Windows. Idk about Linux, I've never used it there before.

@williamd1k0
Copy link
Contributor

williamd1k0 commented Sep 18, 2018

I tried it on Windows and I think this is not a Godot bug.

gc-controller

I have 3 hypotheses:

  1. This is a driver issue (I can try to reproduce it with another driver or the Dolphin built-in driver).
  2. This is a design issue, since the GC d-pad is really small, it may be difficult to press only one direction at a time sometimes (perhaps this may be also reproducible in Gameboy Advance because it has the same d-pad design).
  3. This is a hardware issue with the Mayflash Adapter.

@williamd1k0
Copy link
Contributor

It's-a me again.

Using filter driver for WiiU mode and Dolphin built-in support. Same behavior.

(I'm pressing only the d-pad down in this test)
gc-controller2

I reinforce that this does not seem to be a Godot bug.

@akien-mga
Copy link
Member

Thanks for testing. If it's a hardware/drivers bug there's indeed nothing we can do sadly, so closing.

@sdhy
Copy link
Author

sdhy commented Sep 20, 2018

Everything now works properly.

First, I tested it on windows. Didn't work, so I installed the firmware driver thing and it worked.

Then I installed the firmware for Mac and tested it on Mac, and now it works!

I swear I installed the Mac firmware before. Not sure why it didn't work that time.

Thanks for testing it out, William

@Ka-lua
Copy link

Ka-lua commented Apr 29, 2019

Can we reopen this issue? I have the same problem on Linux, with a Mayflash USB Gamecube adapter. It is not a hardware issue, because the D-Pad works in Dolphin, the Gamecube emulator. It also works in pygame, which uses SDL. In Godot I receive two events when I press or release a single D-Pad button, the button codes are:

Right: 13 15
Down: 14 13
Left: 15 14
Up: 12 12

Input.is_joy_button_pressed(...) also returns true for two button codes, when only one button is pressed.

@akien-mga akien-mga reopened this Apr 30, 2019
@akien-mga akien-mga added bug and removed archived labels Apr 30, 2019
@akien-mga
Copy link
Member

akien-mga commented Jan 8, 2020

Is this still reproducible in the current master branch / latest Godot 3.2 builds?

If so, can you retrieve the GUID of the affected gamepad with Input.get_joy_guid(0) (assuming it's the device 0)?

@KoBeWi
Copy link
Member

KoBeWi commented Dec 10, 2020

Can anyone still reproduce this bug in Godot 3.2.3 or any later release?

btw this is a bit similar to #35903

@Ka-lua
Copy link

Ka-lua commented Dec 11, 2020

Right now Godot doesn't detect my Mayflash controller at all, but I am currently using a udev rule so that I can use the Mayflash adapter in WiiU mode instead of PC mode. The udev rule is

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", MODE="0666"

I will try to reproduce the original problem without that rule later.

@williamd1k0
Copy link
Contributor

I still don't think that's a Godot issue.
As I said 2 years ago:

1. This is a driver issue (I can try to reproduce it with another driver or the Dolphin built-in driver).
2. This is a design issue, since the GC d-pad is really small, it may be difficult to press only one direction at a time sometimes (perhaps this may be also reproducible in Gameboy Advance because it has the same d-pad design).
3. This is a hardware issue with the Mayflash Adapter.

2 years ago I tried to reproduce on Windows and now I tried on Manjaro Linux. I still have the same Mayflash adapter with WiiU and PC modes (hardware switch).

I didn't try to install any additional drivers (other than the xpadneo that I mentioned in #35903) and the Mayflash adapter worked well in WiiU mode (tested on Dolphin emu) and PC mode. Only the d-pad is "randomly" pressing other directions at the same time.

Therefore, I strongly believe that it is a problem in the controller itself:

2. This is a design issue, since the GC d-pad is really small, it may be difficult to press only one direction at a time sometimes (perhaps this may be also reproducible in Gameboy Advance because it has the same d-pad design).

@williamd1k0
Copy link
Contributor

Is this still reproducible in the current master branch / latest Godot 3.2 builds?

If so, can you retrieve the GUID of the affected gamepad with Input.get_joy_guid(0) (assuming it's the device 0)?

03000000790000004318000010010000

@ConnorWhalen
Copy link

For what it's worth, i was having lots of controller problems (described in #56475) and it's only when i updated the mayflash firmware to the latest version that i got to the state described in this issue where the d-pad fires multiple times. Though i'm just getting the direction i pressed twice and no other direction. So maybe it's an issue with the mayflash firmware?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants