• themoonisacheese@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Most non-xbox controllers use well-known USB extents that are universally recognized as belonging to a generic controller. Windows will display a controller icon, libraries like pygame and SDL 2 will process them as regular controllers, etc. As such, most controllers need no drivers. The exception is that games written with directX use xinput, which is proprietary and has licensing costs to get your controller into (to prevent low-cost controllers from undercutting Microsoft’s price-gouging official offering).

    Converting USB controller to xinput has famously been a really hard problem, requiring a lot of fancy software that is often incompatible with anticheat and copy protection. Steam is able to do it because the steam overlay is whitelisted by everything that could block it, and is otherwise developped by really great devs.

    In the process of intercepting inputs to the game and translating them, you can imagine it’s quite easy to swap a button for another, that’s how controller remapping works. Some devs additionnally provide steam with custom things a controller may do that may not have a key assigned but becomes callable from a key through the overlay.