kenshaw / motionserver

DualShock4 motion server for Cemu on Linux
MIT License
2 stars 2 forks source link

Crash with 2 dualshocks connected #5

Open toccata10 opened 3 years ago

toccata10 commented 3 years ago

1st of all: thanks for this very useful piece of software: I'm using this on yuzu to add motion control and it works fine. With 1 gamepad: perfect. With 2 gamepads:

2021/02/23 14:31:04 [98:b6:e9:4d:82:13] "Wireless Controller Motion Sensors" (/dev/input/event27) connected to slot 0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x50f93e]

goroutine 52 [running]:
main.sendReport(0xc000010030, 0xc0002244f8, 0x11, 0x6, 0x0, 0x5bc00ee19de8f, 0x0, 0x0, 0x0, 0x0, ...)
        motionserver/motionserver-master/main.go:377 +0x9e
created by main.poll
        motionserver/motionserver-master/main.go:341 +0x61d

My evtest output:

/dev/input/event23:     Wireless Controller Touchpad
/dev/input/event24:     Wireless Controller Motion Sensors
/dev/input/event25:     Wireless Controller
/dev/input/event26:     Wireless Controller Touchpad
/dev/input/event27:     Wireless Controller Motion Sensors
/dev/input/event28:     Wireless Controller
toccata10 commented 3 years ago

The problem is probably that both controllers connect to the slot 0: 2021/03/31` 11:22:43 [98:b6:e9:4d:82:13] "Wireless Controller Motion Sensors" (/dev/input/event3) connected to slot 0 2021/03/31 11:22:43 [a4:53:85:7a:77:e4] "Wireless Controller Motion Sensors" (/dev/input/event6) connected to slot 0