Skip to content

Gamepad Mappings are Incorrect on Windows #620

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

Closed
mpeterson-retrostudios opened this issue Jun 28, 2021 · 1 comment
Closed

Gamepad Mappings are Incorrect on Windows #620

mpeterson-retrostudios opened this issue Jun 28, 2021 · 1 comment

Comments

@mpeterson-retrostudios
Copy link

mpeterson-retrostudios commented Jun 28, 2021

The gamepad guids and button mappings detected by Moonlight are incorrect on Windows, resulting in erroneous behavior for certain controllers.

If you connect an XBox 360 controller and/or PS4 Controller using the most recent gamecontrollerdb.txt, you will see something like this in the Moonlight-**********.log:
Moonlight-1624900765.log

00:00:14 - SDL Info (0): Gamepad 0 (player 0) is: PS4 Controller (haptic capabilities: 0x10000) (mapping: 030000004c050000cc09000000016800 -> 030000004c050000cc09000000016800,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,)
00:00:14 - SDL Info (0): Gamepad 1 (player 1) is: ShanWan PS3/PC Wired GamePad (haptic capabilities: 0x10000) (mapping: 030000005e0400008e02000000007801 -> 030000005e0400008e02000000007801,ShanWan PS3/PC Wired GamePad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,)

Note:
The "ShanWan PS3/PC Wired GamePad" produces desired mappings for the "XInput Controller", so it has likely gone unnoticed.
The new "PS4 Controller" mappings that were added to the game controller database recently (see Add a new guid for a PS4 controller/windows) produce undesired behavior, however. (The guid is reported as 030000004c050000cc09000000016800, instead of the correct 030000004c050000cc09000000000000.)

The correct gamepad guid and mappings can be observed by using either Steam's Big Picture mode or the SDL2 Gamepad Tool on Windows. (Using www.gamepad-tester.com will also demonstrate correct mappings on a client and incorrect mappings on the server for the PS4 Controller.)

Clients tested:

  • OS: Windows 10.0.18363 and 10.0.19041
  • Moonlight Version: 3.1.4
  • GPU: AMD RX 580, AMD RX 550, and Intel(R) UHD Graphics 630

Servers tested:

  • OS: Windows 10.0.18363 and 10.0.19041
  • GeForce Experience version: 3.23.0.74
  • Nvidia GPU driver: 26.21.14.4587
  • Antivirus and firewall software: Windows Defender and Windows Firewall
@cgutman
Copy link
Member

cgutman commented Jun 30, 2021

Fixed in SDL_GameControllerDB with mdqinc/SDL_GameControllerDB#480
which was published to the moonlight-stream.org mirror with moonlight-stream/moonlight-stream.github.io@c5a533c

Moonlight should pull the new mappings down after you restart it a couple times.

@cgutman cgutman closed this as completed Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants