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

AtGames ControlDeck recognized and mapped as gamepad when wired, not when paired with bluetooth. #880

Closed
mikewalshchicago opened this issue Dec 8, 2023 · 0 comments

Comments

@mikewalshchicago
Copy link

Please provide the following info.

NVidia Geforce Experience version: Sunshine v 0.21.0 (latest)
Moonlight Embedded version: Moonlight Embedded 2.5.3 (CEC;ROCKCHIP;SDL;ALSA;EMBEDDED)
Moonlight Embedded source: repository/included in distribution/compiled from source/... included in distribution (Legends Unchained)
Moonlight Embedded running on: Raspberry Pi/Cubox-i/Hummingboard/Other linux device/... AtGames Legends Pro puck (Linux)
Moonlight Embedded running on distribution: Arch Linux/Raspbian/OpenELEC/... Linux RCADE 4.4.302-mrfixit #2 SMP Sun Jul 2 20:09:07 EDT 2023 aarch64 GNU/Linux

Verbose output -verbose of Moonlight Embedded:

GPU: , GFE: 3.23.0.74 (, 7.1.431.-1)
Platform Rockchip VPU
Loading mappingfile /rcade/share/configs/moonlight/mapping.conf
Not mapping RC for dw_hdmi as a gamepad
Not mapping gpio-keys as a gamepad
Not mapping rotate-gpio as a gamepad
Not mapping Virtual Keyboard as a gamepad
Detected Control deck-P2 (050000005e0400004000000000030000) on /dev/input/event4 as Control deck-P1
Not mapping Control deck-P2 as a gamepad
Detected Control deck-P1 (050000005e0400004000000000030000) on /dev/input/event5 as Control deck-P1
Not mapping Control deck-P1 as a gamepad

What is the expected result?

/dev/input/event4 and /dev/input/event5 should be mapped as gamepads

What happens instead of that?

Moonlight connects to the stream, audio and video work fine. Bluetooth connected ControlDeck devices are not emulated as gamepads and presented to Windows.

The AtGames Legends Pro ControlDeck is two separate joysticks w/buttons and a trackball. The trackball is always recognized as a mouse and works where it is bluetooth or wired connection

When the ControlDeck is wired, it reports itself as the following device ID, and the mappings below work:

03000000380800001889000011010000,HID 0838:8918,platform:Linux,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,a:b1,b:b2,x:b0,y:b3,back:b12,start:b9,leftshoulder:b13,rightshoulder:b5,lefttrigger:b14,righttrigger:b7,leftstick:,rightstick:,leftx:,lefty:,rightx:,righty:

although the debug output from moonlight does say that is not mapping HID 0838:8918 as a gamepad, it is followed by two detection events. Perhaps the first message is a red herring

Not mapping HID 0838:8918 as a gamepad
Detected HID 0838:8918 (03000000380800001889000011010000) on /dev/input/event5 as HID 0838:8918
Detected HID 0838:8918 (03000000380800001889000011010000) on /dev/input/event6 as HID 0838:8918

However, when the ControlDeck is paired and connected via bluetooth, it is represented as the following devices.

050000005e0400004000000000030000,Control deck-P2,platform:Linux,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,a:b5,b:b6,x:b8,y:b9,back:,start:b16,leftshoulder:b14,rightshoulder:b11,lefttrigger:b13,righttrigger:b12,leftstick:,rightstick:,leftx:,lefty:,rightx:,righty:
050000005e0400004000000000030000,Control deck-P1,platform:Linux,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,a:b5,b:b6,x:b8,y:b9,back:b30,start:b16,leftshoulder:b14,rightshoulder:b11,lefttrigger:b13,righttrigger:b12,leftstick:,rightstick:,leftx:,lefty:,rightx:,righty:

When connected this way, the moonlight output shows that the devices are recognized, but not as gamepads. Note that the 'not mapping' message comes after the device was detected in this case

Detected Control deck-P2 (050000005e0400004000000000030000) on /dev/input/event4 as Control deck-P1
Not mapping Control deck-P2 as a gamepad
Detected Control deck-P1 (050000005e0400004000000000030000) on /dev/input/event5 as Control deck-P1
Not mapping Control deck-P1 as a gamepad

I have paired a PS4 controller via bluetooth, and that device is presented to windows as a gamepad.

zoeyjodon added a commit to zoeyjodon/moonlight-N3DS that referenced this issue Mar 20, 2024
* Update moonlight-common-c with RTSP encryption

* Fix __builtin_cpu_supports(aes) on GCC 9 and earlier

* Update SDL_GameControllerDB

* Add missing CMake include

* Replace FindLibUUID.cmake with modified version from CMake project

* Update moonlight-common-c

* Replace ioctl() retry loops with drmIoctl()

* Add rotation support for Rockchip

Fixes moonlight-stream#878

* Treat devices as gamepads if they have a hat instead of an analog stick

Fixes moonlight-stream#880

* Ignore CRCs in SDL mappings

* Move CPU detection code into a separate file

* Link util.c into the platform libraries

* Replace SDL key handling with Moonlight Qt code

The existing code had a bunch of incorrectly mapped keys and was using
keysym instead of scancode which causes issues with non-US keyboards.

* Remove a bunch of useless asserts

* Provide better errors when RK renderer fails

* Version 2.7.0

* Fix build warnings

* Adds the ability to display side-by-side stereoscopic 3D images in 3D mode.
Adds offset buffers for 3D images.

* Add config option for displaying the stream across both displays.
Adds video logic for stretching stream images across top and bottom displays.
Simplifies 3D/Wide mode switching.

* Adds touch handler for dual screen mode
formats modified files

* Fix build dependency error
Add dual screen status to the loading print
Move all wide mode setting to ensure_3d functions

* Bump moonlight-common-c
This seems to fix connection issues with sunshine v0.22

* Fix graphics glitch on exit

* Add gyroscope/accelerometer output
Add config option for enabling/disabling motion controls

* Smooth out motion control behavior
Fix gyroscope coefficient use
Fix gyroscope directions (tested with cemu)

---------

Co-authored-by: Cameron Gutman <aicommander@gmail.com>
zoeyjodon added a commit to zoeyjodon/moonlight-N3DS that referenced this issue Jun 9, 2024
* Update moonlight-common-c with RTSP encryption

* Fix __builtin_cpu_supports(aes) on GCC 9 and earlier

* Update SDL_GameControllerDB

* Add missing CMake include

* Replace FindLibUUID.cmake with modified version from CMake project

* Update moonlight-common-c

* Replace ioctl() retry loops with drmIoctl()

* Add rotation support for Rockchip

Fixes moonlight-stream#878

* Treat devices as gamepads if they have a hat instead of an analog stick

Fixes moonlight-stream#880

* Ignore CRCs in SDL mappings

* Move CPU detection code into a separate file

* Link util.c into the platform libraries

* Replace SDL key handling with Moonlight Qt code

The existing code had a bunch of incorrectly mapped keys and was using
keysym instead of scancode which causes issues with non-US keyboards.

* Remove a bunch of useless asserts

* Provide better errors when RK renderer fails

* Version 2.7.0

* Fix build warnings

* fix unbounded write of sprintf

Buffer write operations that do not control the length of data written
may overflow. Fix by replacing sprintf() with snprintf().

* Update moonlight-common-c

* Bump version number

* Guard 3D display glitch with 400-width streams
Use trunc for motion rounding to 0 instead of floor

---------

Co-authored-by: Cameron Gutman <aicommander@gmail.com>
Co-authored-by: Mingjie Shen <shen497@purdue.edu>
This issue was closed.
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

1 participant