macOS: Add GameController framework support?

Apple recently added support for Force Feedback to GameController with the release of Big Sur. Although it does look like the old Force Feedback drivers for the Xbox 360 controllers are working again, PS4 and native Xbox One FF support seems only to work through the GameController/CoreHaptics frameworks.

I have created a patch that builds the iOS GameController code for macOS, as well as limiting the GC code to Big Sur and later, as well as preventing duplicate IOHIDDevices from being added to the “old” IOKit code. Would integrating this code be considered?

Added as Bug #5355.