Emulator Issues #12546

Multiplayer Wii Controller Profile switching: all controllers map to same player.

Added by midget35 4 months ago. Updated 4 months ago.

% Done:


Operating system:
Issue type:
Relates to usability:
Relates to performance:
Relates to maintainability:
Regression start:
Fixed in:


This applies to switching Wii Controller Profiles when input mode is set to "Emulated Wii Remote" for all players.


  1. Assign a hotkey to toggle Wii controller profiles in-game.
  2. Start a 2 player game with emulated Wii controllers.(Mario Kart Battle mode is a great example).
  3. Play the game to verify each player has control of their respective character.
  4. Hit the hotkey to switch controller profiles.

Actual Outcome:

Both characters will now be controlled by the same emulated Wii input device. If I'd done this with a 4 player device, all 4 would be controlled by one controller.

Expected Outcome:

1. Only the player who pressed the hotkey should find their profile has changed.
2. All players' profiles change, providing bespoke profiles have been set up for wiimotes 2 - 4 as they have been for wiimote 1.

Either way - all players remain in control of their respective characters.

Proposed fix:

Please see attached. Because the UI for profile hotkey assignment is so far advanced, I am optimistic a lot of the work is already done.

The Wiimote Profile Ini files currently start with the header '[Profile]'. All Ini entries below this header are automatically assigend to all players, as things stand.

I recommend Dolphin looks for additional headers after this one, looking for headers '[Wiimote1]' through to '[Wiimote4]'.

When the hotkey is pressed and the next profile is loaded, Dolphin will look for these '[WiimoteX]' headers and assign them to players as needed.

If one Wiimote header is not found (say '[Wimmote3]') when the profile is loaded, that player simply keeps their previous control scheme.

If no Wiimote headers are found under the main '[Profile]' header, Dolphin simply behaves as it does now. This way - nothing breaks.

I would like to add that the Dolphin input system for emulated devices is phenominal. It is extremely powerful and I extend my gratitude to the person / people behind this implementation.

dolphin.png (18.1 KB) dolphin.png midget35, 06/08/2021 12:48 PM
1 - Upright - Nunchuck.ini (5.89 KB) 1 - Upright - Nunchuck.ini midget35, 06/09/2021 12:03 PM
Sideways.ini (5.88 KB) Sideways.ini midget35, 06/09/2021 12:03 PM


#1 Updated by iwubcode 4 months ago

The work for this should already be done in this PR: . Instead of there being a global cycle manager, each controller has an object that manages what its current profile is. I need to update that PR as it's very old and was never merged.

#2 Updated by iwubcode 4 months ago

Actually, take that back. While the above PR might make things cleaner, the current code should be behaving correctly. If it isn't, this is a bug.

Which hotkey are you using? The screenshot you have assigned is showing empty input. There's an individual key per controller.

Also, please attach your profiles too if available.

#3 Updated by midget35 4 months ago

Thanks, iwubcode. I have attached 2 examples of the profiles that I switch between. Only the lines starting 'Extension' and 'Options/Sideways Wiimote' differ.

Yes, the screenshot I posted contains empty input. It was merely to illustrate my journey on this topic: showing that a lot of work appears to have been done to correctly assign profiles on a per-user basis.

I should have been more clear on one thing, though: I am not talking about per-game profiles, in case that is part of the PR and code review you are referencing. That I have not tested. This report is solely about the 'Next Game Profile' and 'Previous Game Profile' that can be set on a per-Wiimote basis.

I have tried many variations of hotkeys trying to get profiles to be applied on a per-user basis. Examples include (as they appear in the ini):

Wii Remote 1 > Next Profile:
Controller Profile 1/Next Profile = XInput/0/Gamepad:Shoulder R

Wii Remote 2 > Next Profile:
Controller Profile 2/Next Profile = XInput/1/Gamepad:Shoulder R

... I really don't see how multi-user profiles can work in the current state. All users will always end up tied to whichever XInput / DInput devices are set in a given profile as soon as it is loaded. There is simply no user-by-user / Wiimote-by-Wiimote distinction possible with profiles. I will be delighted if I am wrong about these things, though.

Thanks again, Iwubcode.

#4 Updated by iwubcode 4 months ago

Ah thank you for clarifying.

I think what we could do to enhance the profile cycling is to only cycle to the next profile that has that same device.

Example: so if you're on 'XInput/0/Gamepad' you shouldn't jump to 'XInput/1/Gamepad'. You'd get the next 'XInput/0/Gamepad' profile specified (which may be the same profile you're on).

So for your attached profiles, you'd actually need two of each.

Player1 - Upright - Nunchuk.ini (uses XInput/0/Gamepad)
Player2 - Upright - Nunchuk.ini (uses XInput/1/Gamepad)

Player1 - Sideways.ini (uses XInput/0/Gamepad)
Player2 - Sideways.ini (uses XInput/1/Gamepad)

Today if Player1 cycled, they'd go to Player2's profile and player2 would control both. In the proposed revision, if Player1 cycle'd they'd go to the next Player1 profile.

Would that work for your purposes? It'd be fairly easy to update 8305 to support that.

#5 Updated by midget35 4 months ago

Thank you! I appreciate your patience with this.

So - I am thinking of possible drawbacks to your solution. If I understand correctly:

  1. You are assuming that each player will have / want only one input device in a profile. This may not necessarily be the case. For example, just as there is XInput/0/, so there may be DSUClient/0/ and DInput/0/. It is not inconceivable that all three would be used - in fact, I use all three in my profiles. The DSUClient is the Playstation DS4 motion input, and I map DInput/0/ as a virtual gamepad (vjoy) to use the DS4 touchpad button as the Wiimote Home button. Sometimes, those three input 'types' are not all zero, as well.

  2. Another issue is the way XInput and DInput indexes are assigned, Player #1 can easily end up as, say XInput index 3 if there are multiple controllers connected, while player #2 ends up as XInput 1. This is a very common scenario (unlike my first point).

So with nothing but respect - I can't quite see how this would work. Sorry if I'm overlooking something you said / implied.

#6 Updated by midget35 4 months ago

I should add - to answer your question specifically, iwubcode - that your solution probably would work for my purposes. Providing DSUClient and DInput values are ignored when searching for next profile, and Players 1 - 4 are not hardcode XInput values 0 - 3, it should work. (i.e. if when Dolphin starts player #1's wiimote is Xinput Index #2, only profiles with XInput/2/ are assignable to that user thereafter).

Ah... I think I see where you are coming from now :)

You are banking on this line:

'Device = XInput/0/'

... being at the top if each profile, right? That's interesting. I had some issues getting DSUClient connected with multiple gamepads, and only got around it by setting 'Device = DSUClient/0/' etc for each player. Lots to think about lol! But if that workaround isn't needed, you could well be on to something.

#7 Updated by midget35 4 months ago

I hope this fix can go ahead. I am certainly up for testing and feeding back :)

Also available in: Atom PDF