Fix Dual Joy-Con driver and InputView

  • We now separate the joy-cons from other controllers for easier handling.
    • When a joy-con is added, it first checks _joyConIds for potentially matching joy-cons. If it finds one it creates a new dual joy-con entry in _gamepadIds using a combined id from both joy-cons and then moves the 2 joy-cons into _linkedJoyConIds.
    • When a joy-con is removed it checks the _gamepadIds for dual joy-cons that match the id of the removed joy-con. If it finds one it removes the dual joy-con and the other joy-con is moved back into _joyConIds for re-matching.
  • Fixed a few visual bugs in the InputView:
    • Controller indices no longer carry over into other controllers. Before having e.g. 3 PS4 controllers (numbered 0, 1 and 2) would cause any other controller to also start from number 2. Now controller indices are for each individual controller type.
    • Because of some bad logic ordering, the input viewer would accidentally load the default Pro Controller image when a controller was disconnected. It now correctly loads the image for the current controller.
    • Avalonia ComboBoxes start with a default index of 0, therefore setting the index to 0 would not update the index. The Controller Type setting would therefore show up blank sometimes when it wasn't supposed to. By setting the index to 1 and then back to 0 we can force Avalonia to update the ComboBox.

Merge request reports

Loading