Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: How does Windows identify and asign a number to gamepads?  (Read 903 times)

0 Members and 1 Guest are viewing this topic.

monkeybomb

  • PM me to find out how to get a custom title like mine!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1236
  • Last login:January 03, 2018, 07:16:29 pm
How does Windows identify and asign a number to gamepads?
« on: October 26, 2015, 02:34:10 pm »
If I plug in a gamepad and then another of the same type, how does windows determine player 1 and player 2?  I have a pair of gamepad controllers that I need to swap and it doesn't matter what I plug in first or if either/both of the gamepads are plugged in at boot-up.  How is it assigning the number?

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9273
  • Last login:Yesterday at 04:44:02 pm
  • ...
Re: How does Windows identify and asign a number to gamepads?
« Reply #1 on: October 26, 2015, 02:59:20 pm »
I'm sure that someone more knowledgeable will be along with a better explanation, but in my experience:

xinput gamepads (xbox 360 controllers)have some sort of on board device ID and windows assigns the player # based on that.
(so they can't be re-ordered)

direct input gamepads are assigned an order based on when they are plugged in.

This made an extra wrinkle in using hacked xbox360 fightpads on my cab sincexbox360 controllers are both direct input gamepads and xinput gamepads based on what the game supports.  I had to figure out which pad would be seen as xinput controller #1, then unplug them and replug them in the correct order so it would also show up as controller #1 for games that only accept direct input.