Skip to content

[wii] Fix profile clash on two controllers with the same name#15104

Open
vjt wants to merge 1 commit intobatocera-linux:masterfrom
vjt:master
Open

[wii] Fix profile clash on two controllers with the same name#15104
vjt wants to merge 1 commit intobatocera-linux:masterfrom
vjt:master

Conversation

@vjt
Copy link

@vjt vjt commented Jan 10, 2026

I two Dualsense controllers, enumerated in Dolphin's wiimote config as

Device = evdev/0/DualSense Wireless Controller

and

Device = evdev/1/DualSense Wireless Controller

I also have profiles on them, as I want to use Dolphin's native motion control support via evdev. This is mostly to play New Super Mario Bros Wii.

So my profiles contain

IMUAccelerometer/Up = `evdev/1/DualSense Wireless Controller Motion Sensors:Accel Y+`
IMUAccelerometer/Down = `evdev/1/DualSense Wireless Controller Motion Sensors:Accel Y-`
IMUAccelerometer/Left = `evdev/1/DualSense Wireless Controller Motion Sensors:Accel X-`
IMUAccelerometer/Right = `evdev/1/DualSense Wireless Controller Motion Sensors:Accel X+`
IMUAccelerometer/Forward = `evdev/1/DualSense Wireless Controller Motion Sensors:Accel Z-`
IMUAccelerometer/Backward = `evdev/1/DualSense Wireless Controller Motion Sensors:Accel Z+`
IMUGyroscope/Pitch Up = `evdev/1/DualSense Wireless Controller Motion Sensors:Gyro X+`
IMUGyroscope/Pitch Down = `evdev/1/DualSense Wireless Controller Motion Sensors:Gyro X-`
IMUGyroscope/Roll Left = `evdev/1/DualSense Wireless Controller Motion Sensors:Gyro Z+`
IMUGyroscope/Roll Right = `evdev/1/DualSense Wireless Controller Motion Sensors:Gyro Z-`
IMUGyroscope/Yaw Left = `evdev/1/DualSense Wireless Controller Motion Sensors:Gyro Y+`
IMUGyroscope/Yaw Right = `evdev/1/DualSense Wireless Controller Motion Sensors:Gyro Y-`
Options/Sideways Wiimote = True

however, as the current code matches pads to profiles using only the pad name, the accelerometer configuration for controller 0 ends up in the wiimote config for controller 1 - effectively making player 1 shake the remote and send the shake command to both player 1 and player 2 remotes.

With this change instead we don't do any matching on the pad name, rather we match the profile against the entire device id, with the evdev/ prefix - so no possibility of overlap.

I two Dualsense controllers, enumerated as

Device = evdev/0/DualSense Wireless Controller

and

Device = evdev/1/DualSense Wireless Controller

I also have profiles on them, as I want to use Dolphin's native motion control support via evdev. This is mostly to play New Super Mario Bros Wii.

So my profiles contain

IMUAccelerometer/Up = `evdev/1/DualSense Wireless Controller Motion Sensors:Accel Y+`
IMUAccelerometer/Down = `evdev/1/DualSense Wireless Controller Motion Sensors:Accel Y-`
IMUAccelerometer/Left = `evdev/1/DualSense Wireless Controller Motion Sensors:Accel X-`
IMUAccelerometer/Right = `evdev/1/DualSense Wireless Controller Motion Sensors:Accel X+`
IMUAccelerometer/Forward = `evdev/1/DualSense Wireless Controller Motion Sensors:Accel Z-`
IMUAccelerometer/Backward = `evdev/1/DualSense Wireless Controller Motion Sensors:Accel Z+`
IMUGyroscope/Pitch Up = `evdev/1/DualSense Wireless Controller Motion Sensors:Gyro X+`
IMUGyroscope/Pitch Down = `evdev/1/DualSense Wireless Controller Motion Sensors:Gyro X-`
IMUGyroscope/Roll Left = `evdev/1/DualSense Wireless Controller Motion Sensors:Gyro Z+`
IMUGyroscope/Roll Right = `evdev/1/DualSense Wireless Controller Motion Sensors:Gyro Z-`
IMUGyroscope/Yaw Left = `evdev/1/DualSense Wireless Controller Motion Sensors:Gyro Y+`
IMUGyroscope/Yaw Right = `evdev/1/DualSense Wireless Controller Motion Sensors:Gyro Y-`
Options/Sideways Wiimote = True

however, as the current code matches pads to profiles using only the pad name, the accelerometer configuration for controller 0 ends up in the wiimote config for controller 1 - effectively making player 1 shake the remote and send the shake command to both player 1 and player 2 remotes.

With this change instead we don't do any matching on the pad name, rather we match the profile against the entire device id, with the evdev/ prefix - so no possibility of overlap.
@dmanlfc
Copy link
Collaborator

dmanlfc commented Jan 19, 2026

@nadenislamarre please review

@dmanlfc dmanlfc added the 43 Batocera 43 label Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

43 Batocera 43

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants