Preserve controller input order

I am compiling a sample project in the latest version of MonoGame with plans to port over an existing XNA game. In polling the controllers that are active, I have the following code (MaxPlayers defined as 8)

      // Update previous gamepad states
      for(int padIndex = 0; padIndex < Global.MaxPlayers; ++padIndex)
      {
        m_gamePadPrevious[padIndex] = m_gamePadCurrent[padIndex];
        m_gamePadCurrent[padIndex] = GamePad.GetState(padIndex);

        if (m_gamePadCurrent[padIndex].Buttons.A == ButtonState.Pressed)
        {
          Debug.WriteLine("Controller {0} A button pressed", padIndex);
        }
      }

The main problem I’m having is that this code doesn’t behave the same way as XNA does.
XNA - Controller 2 disconnects - Controller 2 IsConnected = false, all controllers before and after this index stay the same with IsConnected = true
MonoGame - Controller 2 disconnects - Controller 2 IsConnected = true, the controllers after this index move down in the array, Controller 4 shows IsConnected = false instead.

In MonoGame, if any controllers disconnect, this result will always show the last controller as disconnected, even if any other player’s controller disconnects.

Is there an easy way to preserve the behavior that XNA already provides or is there a code sample I can use to grab the controller ID or detect the proper controller index that disconnected? I’m not seeing anything in GamePad or GamePadState that is obvious. I have 4 XBox 360 and 4 XBox One controllers to use for testing.

Thanks in advance,
Zorcher

This sounds like a bug to me; which platform are you developing for?

Please report it as an issue here.