moonlight-stream / moonlight-embedded

Gamestream client for embedded systems
https://github.com/moonlight-stream/moonlight-embedded/wiki
GNU General Public License v3.0
1.48k stars 322 forks source link

Moonlight DPAD mappings aren't recognized with analog values #844

Open StonedEdge opened 2 years ago

StonedEdge commented 2 years ago

Please provide the following info.

Moonlight Embedded version:_2.5.2 Moonlight Embedded running on:_Raspberry Pi CM4 Moonlight Embedded running on distribution:_Raspbian Buster (RetroPie)

Verbose output -verbose of Moonlight Embedded: Moonlight Embedded 2.5.2 (PI;MMAL;ALSA;PULSE;EMBEDDED) Searching for server... Connect to 100.64.1.21... GPU: NVIDIA GeForce RTX 2060, GFE: 3.24.0.126 (gs_04_37_30719632, 7.1.437.0) Platform Raspberry Pi (Broadcom) Loading mappingfile /opt/retropie/configs/all/moonlight/gamecontrollerdb.txt Detected SparkFun SparkFun Pro Micro (030000004f1b00000692000001010000) on /dev/input/event0 as SparkFun SparkFun Pro Micro Not mapping SparkFun SparkFun Pro Micro as a gamepad Detected SparkFun SparkFun Pro Micro (030000004f1b00000692000001010000) on /dev/input/event1 as SparkFun SparkFun Pro Micro Stream 1280 x 720, 60 fps, 10000 kbps RTSP port: 48010 Initializing platform...done Resolving host name...done Packet size capped at 1KB for remote streaming Initializing audio stream...done Starting RTSP handshake...Audio port: 48000 Video port: 47998 Control port: 47999 done Initializing control stream...done Initializing video stream...done Initializing input stream...done Starting control stream...done Starting video stream...done Starting audio stream...done Starting input stream...Received first audio packet after 0 ms Initial audio resync period: 500 milliseconds done

What is the expected result? To pair my DPAD via the -map command

What happens instead of that? DPAD does not map, due to being mapped with analog values instead of a traditional POV hat. Is it possible to allow for Moonlight to recognize a DPAD as an analog input instead of POV hat? For example, to allow the dpad up and down to be recognized with ABS_RY and dpad left right to be recognized as ABS_RZ instead of the traditional ABS_X/ABS_Y.

D-Up: Code 4: 37267 D-Down: Code 4: -37267 D-Left: Code 5: -32767 D-Right: Code 5: +32767

Event: time 1643695032.112436, type 3 (EV_ABS), code 4 (ABS_RY), value 32767 Event: time 1643695032.112436, -------------- SYN_REPORT ------------ Event: time 1643695032.196429, type 3 (EV_ABS), code 4 (ABS_RY), value 0 Event: time 1643695032.196429, -------------- SYN_REPORT ------------ Event: time 1643695033.356351, type 3 (EV_ABS), code 4 (ABS_RY), value 32767 Event: time 1643695033.356351, -------------- SYN_REPORT ------------ Event: time 1643695033.450352, type 3 (EV_ABS), code 4 (ABS_RY), value 0 Event: time 1643695033.450352, -------------- SYN_REPORT ------------ Event: time 1643695034.512282, type 3 (EV_ABS), code 4 (ABS_RY), value 32767 Event: time 1643695034.512282, -------------- SYN_REPORT ------------ Event: time 1643695034.612271, type 3 (EV_ABS), code 4 (ABS_RY), value 0 Event: time 1643695034.612271, -------------- SYN_REPORT ------------ Event: time 1643695034.922248, type 3 (EV_ABS), code 4 (ABS_RY), value -32767 Event: time 1643695034.922248, -------------- SYN_REPORT ------------ Event: time 1643695035.004241, type 3 (EV_ABS), code 4 (ABS_RY), value 0 Event: time 1643695035.004241, -------------- SYN_REPORT ------------ Event: time 1643695035.998177, type 3 (EV_ABS), code 5 (ABS_RZ), value 32767 Event: time 1643695035.998177, -------------- SYN_REPORT ------------ Event: time 1643695036.104171, type 3 (EV_ABS), code 5 (ABS_RZ), value 0 Event: time 1643695036.104171, -------------- SYN_REPORT ------------ Event: time 1643695036.516148, type 3 (EV_ABS), code 5 (ABS_RZ), value -32767 Event: time 1643695036.516148, -------------- SYN_REPORT ------------ Event: time 1643695036.564144, type 3 (EV_ABS), code 5 (ABS_RZ), value 0 Event: time 1643695036.564144, -------------- SYN_REPORT ------------