[wii] Fix profile clash on two controllers with the same name#15104
Open
vjt wants to merge 1 commit intobatocera-linux:masterfrom
Open
[wii] Fix profile clash on two controllers with the same name#15104vjt wants to merge 1 commit intobatocera-linux:masterfrom
vjt wants to merge 1 commit intobatocera-linux:masterfrom
Conversation
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.
Collaborator
|
@nadenislamarre please review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I two Dualsense controllers, enumerated in Dolphin's wiimote config as
and
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
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.