SOLUTION: Windows controllers flipping between Player 1 and Player 2.

Arcade cabinet hardware and accessories
Post Reply
User avatar
Posts: 2
Joined: January 2nd, 2019, 3:59 am
Location: Arizona
eBay: Aval0n2016
Initials: AVA

SOLUTION: Windows controllers flipping between Player 1 and Player 2.

Post by Aval0n » January 9th, 2019, 5:44 am

Solution summary: Uses Windows WDK tool 'devcon' to identify and disable Player2 USB device on user logoff, and re-enable upon user login. This forces Player1 controller to be detected first by the system and gain direct input/xinput P1 role.
Must be run as user with admin privileges
Skill level required: novice to moderate.

For a long while now I have been looking for a solution to the rock-paper-scissors bit that Windows does when it reboots on which one of my controllers get Player1. I was able to slightly mitigate this by putting Player1 controller board into the Super Speed USB ports and Player2 into the USB2.0 ports, but it only worked about 70% of the time. That's still enough to be maddening. Windows does a horrible job at handling P1, P2 with directinput / xinput game controllers. Some folks have switched to keyboard emulator boards like Dual Strike 2 to get around this, but I didn't want to sacrifice the convenience of xinput as it rewards default xbox button mappings for all games. I will outline the solution below in case this might help anyone else going crazy with this.

You need to acquire devcon which is part of the Windows Development Kit. I run Windows 10 x64, but it's available all the way back to Server 2003. You can find it here; ... ad-the-wdk

Once downloaded and installed, 'devcon' will exist in your 'C:\Program Files (x86)\Windows Kits\Tools\x64\' path. (If you have 32-bit Windows probably just C:\Program Files\)
This path will be referenced several times throughout the guide. The devcon command will not run if you are not in this path.


(Admittedly method 2 may be more simple, but not everyone will want to take the effort to take apart the cabinet and start unplugging things.)

METHOD 1 - Disable a controller and reboot your PC to see which one doesn't work.

From an elevated command prompt (Right Click --> Run as Administrator) run the following command from the path listed above;
devcon find usb*
This will produce a list of connected USB devices.
Mine showed up as;

USB\VID_045E&PID_C528E\14D61D5 : Xbox 360 Controller for Windows <-- This one wound up being my Player 2 controller
USB\VID_045E&PID_C528E\14D62D5 : Xbox 360 Controller for Windows

Command to disable (Must be run from path listed above);
devcon disable "@USB\VID_045E&PID_C528E\14D61D5"
You will need to replace the USB address with yours. Don't forget to add the @ and double quotes. This will disable the specified controller upon reboot and it will stay off until the opposite command is executed. (Just swap 'disable' with 'enable'.) You have a 50/50 shot.

METHOD 2 - Unplug your Player 1 controller, reboot and run the following command (from path listed above);
devcon find usb*
You should only have 1 controller showing now and should be your Player 2 controller. Take note of the USB address listed for the scripts below.

Make a folder somewhere of your choosing to create the 2 scripts required. I opted to create 'C:\P1 scripts'. Use notepad or your favorite text editor and input;
"C:\Program Files (x86)"\Windows Kits\Tools\x64\devcon disable "@USB\YOURADDRESSTHATYOUIDENTIFIED"
Save this script as 'P1 logoff.bat'

Repeat the process above replacing 'disable' with 'enable' and save as 'P1 logon.bat'
Now that you have your two scripts created, you need to set them to execute at the appropriate times.

Run 'gpedit.msc' and navigate to Local Computer Policy->User Configuration->Windows Settings->Scripts (Logon/Logoff)
In the right field, double click 'Logon', click 'Add' , click 'Browse', navigate to the folder you created with the scripts and select the logon script.
Do the same process for the logoff script.

You are done.
This solved the problem completely for me and my friend. Hopefully it's beneficial for you.

User avatar
Posts: 34
Joined: January 30th, 2019, 9:56 am
Location: Paris
eBay: jeff.artik

Re: SOLUTION: Windows controllers flipping between Player 1 and Player 2.

Post by artik » February 21st, 2019, 1:49 am

To optimize your guide:

devcon.exe is only 3mb!
Simply DL it here: ... abled.html (32 or 64bits version).

Place it in your program file folder, and call it with the full path in your .bat scripts. In my case :

"c:/Program Files/Devcon/devcon" enable "@USB\VID_045E&PID_02D1\7EED804A21DA"

Posts: 4
Joined: October 30th, 2018, 2:12 am
Location: Seattle
eBay: newbong85

Re: SOLUTION: Windows controllers flipping between Player 1 and Player 2.

Post by newbong » March 10th, 2019, 5:38 pm

thanks for sharing. This was really annoying me.

Post Reply