Project

General

Profile

Actions

Emulator Issues #8411

closed

D-Pad Mapping Incorrect with Nyko AirFlo EX Controller on Mac OS X

Added by nicktiberi about 10 years ago. Updated over 9 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Current
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

[READ THIS: https://forums.dolphin-emu.org/showthread.php?pid=276132 <<<
Your answers are there!]

Game Name?
All

Game ID?
All

What's the problem? Describe what went wrong in few words.
When hitting "up" on the controller's d-pad, "right" shows in Dolphin. The other directions appear to map, but "up" on controller triggers "up right" on Dolphin, "down" triggers "down left", "right" triggers "up down right", and "left" triggers "left" (the only one that seems to map correctly).

What did you expect to happen instead?
The Nyko EX d-pad should correctly map in Dolphin (i.e. up = up, down = down, left = left, right = right).

What steps will reproduce the problem?

  1. Plug in Nyko AirFlo EX USB controller
  2. Start Dolphin
  3. Click "controllers" and configure a standard GameCube controller on port 1.
  4. Configure "up" on D-Pad by clicking the button in Dolphin and hitting "up" on the Airflo EX d-pad. Similarly for down/left/right.

Which versions of Dolphin did you test on?
4.0-5935

Does using an older version of Dolphin solve your issue? If yes, which
versions of Dolphin used to work?
Not that I have found.

What are your PC specifications? (including, but not limited to: Operating
System, CPU and GPU)
Mac OS X 10.10.2, MacBook Pro (13-inch, Mid 2012), 2.9GHz Intel Core i7, Intel HD Graphics 4000 1024MB

Is there any other relevant information? (e.g. logs, screenshots,
configuration files)
YouTube video demonstrating issue: https://www.youtube.com/watch?v=QKBy-jwjsms

All other buttons and analog sticks map correctly.

Also, I am able to correctly map the D-Pad in SNES and NES games in OpenEmu on OS X, so it doesn't appear to be a hardware compatibility issue with the controller.

Actions #1

Updated by nicktiberi about 10 years ago

Sorry... Didn't realize I couldn't edit the title after I submitted the issue. :-(

Issue title should be "D-Pad Mapping Incorrect with Nyko AirFlo EX Controller on Mac OS X"

Actions #3

Updated by JMC4789 about 10 years ago

  • Status changed from New to Questionable

It could be an issue with SDL if we use that on Mac OSX. Either way, even if it maps incorrectly, does it control properly?

Actions #4

Updated by MayImilae about 10 years ago

Please show a screenshot of the GCpad window.

Actions #5

Updated by nicktiberi about 10 years ago

It could be an issue with SDL if we use that on Mac OSX. Either way, even if it maps incorrectly, does it control properly?
No, unfortunately it does not seem to control properly. It seems that what is showing on the red squares in the control config is actually happening in game as well ("up" on controller triggers "up right" on Dolphin, "down" triggers "down left", "right" triggers "up down right", and "left" triggers "left").

Please show a screenshot of the GCpad window.
I have included a video demonstrating the issue, which I think is showing the GCpad window the entire time. Is there something else that I could provide that would be more helpful?

Actions #7

Updated by skidau about 10 years ago

Does it work with you right click the button of each control in the GCpad window, select the Nyko in the window that appears, press clear, scroll through the list of controls and click on the one to map, then click Select and OK? Repeat this for all of the other controls.

Actions #8

Updated by nicktiberi about 10 years ago

Does it work with you right click the button of each control in the GCpad window, select the Nyko in the window that appears, press clear, scroll through the list of controls and click on the one to map, then click Select and OK? Repeat this for all of the other controls.

If I do that, it looks correct in the UI, but then "up" is triggered without pressing anything, almost as if it is miscalibrated.

Here's a video demonstrating what happens after I do what you suggested: https://www.youtube.com/watch?v=WTp9WyzZ0rg&feature=youtu.be

Actions #9

Updated by JMC4789 almost 10 years ago

Does this work with any other emulators? I'm beginning to doubt this is a problem that would be localized to Dolphin.

Actions #10

Updated by nicktiberi almost 10 years ago

Does this work with any other emulators? I'm beginning to doubt this is a problem that would be localized to Dolphin.

Yes it does. As stated in the original issue description, mapping the d-pad for this controller works correctly in OpenEmu 1.0.4 on the exact same system. Here is a video showing the controller correctly mapping in OpenEmu: https://www.youtube.com/watch?v=dMBDJ4p95bk&feature=youtu.be (I also tested games to make sure it actually worked; they were just not included in the video.)

Just tried build 6638 of Dolphin and the issue persists, so it does seem to be an issue somewhere in how the d-pad is mapped. Is there a way to provide a custom mapping config file or something?

Actions #11

Updated by JMC4789 almost 10 years ago

What does OpenEmu use for input? Could you try other programs that are either multi-platform, or use SDL for input?

Actions #12

Updated by nicktiberi almost 10 years ago

What does OpenEmu use for input? Could you try other programs that are either multi-platform, or use SDL for input?

I think each emulator within OpenEmu handles input differently.

I just tried Mupen64Plus via M64Py (a cross-platform emulator that uses SDL for input) and it worked: http://youtu.be/gxIOY6sYoOM

Mupen64Plus GitHub: https://github.com/mupen64plus

Actions #13

Updated by nicktiberi almost 10 years ago

Here is where Mupen64Plus appears to be mapping the controls via SDL: https://github.com/mupen64plus/mupen64plus-input-sdl/blob/master/src/config.c

Actions #14

Updated by JMC4789 almost 10 years ago

  • Status changed from Questionable to Accepted

Thanks. I still have no idea what could be going wrong, unfortunately.

Actions #15

Updated by nicktiberi over 9 years ago

I finally got around to building Dolphin on OS X and I fixed this issue in my case.

I edited ControlState Joystick::Hat::GetState() in https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm#L227 to basically ignore case 0 (since the default state of my controller's hat is 0) and also bind 1/up, 3/right, 5/down, 7/left. After doing that, everything worked perfectly for my Nyko controller.

This seems like a hack, so I'm wondering if there is a better way to handle this so that it would not break other controllers on OS X. Unfortunately the Nyko is the only one I have available to test with.

ControlState Joystick::Hat::GetState() const
{
	IOHIDValueRef value;
	int position;

	if (IOHIDDeviceGetValue(m_device, m_element, &value) == kIOReturnSuccess)
	{
		position = IOHIDValueGetIntegerValue(value);

		switch (position)
		{
		case 0:
			if (m_direction == up)
				//return 1;
			break;
		case 1:
			if (m_direction == up)// || m_direction == right)
				return 1;
			break;
		case 2:
			if (m_direction == right)
				return 1;
			break;
		case 3:
			if (m_direction == right)// || m_direction == down)
				return 1;
			break;
		case 4:
			if (m_direction == down)
				return 1;
			break;
		case 5:
			if (m_direction == down)// || m_direction == left)
				return 1;
			break;
		case 6:
			if (m_direction == left)
				return 1;
			break;
		case 7:
			if (m_direction == left)// || m_direction == up)
				return 1;
			break;
		};
	}

	return 0;
}
Actions #16

Updated by JosJuice over 9 years ago

  • Status changed from Accepted to Fix pending
  • Milestone set to Current
Actions #17

Updated by Lioncash over 9 years ago

  • Status changed from Fix pending to Fixed
Actions

Also available in: Atom PDF