1. Richard Goedeken
  2. mupen64plus-input-sdl

Pull requests

#25 Merged
Repository
Deleted repository
Branch
default (c4edfa0d9d6c)
Repository
mupen64plus-input-sdl
Branch
default

Add support for XInput autoconfiguration

Author
  1. ecsv
Reviewers
Description

SDL2.0 introduces a new input backend for XInput devices. These have a different layout (buttons, axis, hats, ...) than the previous backends. This makes the current AutoConfig entries for such devices useless. Unfortunatelly, SDL2 doesn't inform us about the backend used to talk to a joystick/gamepad. This makes it hard to decide whether we must search for an entry without prefix, with Win32 prefix or with a new "XInput" prefix. Instead the whole ini is parsed and it is not stopped when a section with a valid entry is finished. Priorities are saved to decide whether a new found section is interesting for the user config or not. Entries without a known prefix have the priority 3, one with a known entry have the priority 2 and entries with the prefix "XInput" get the priority of 1 on windows with SDL2. The lowest priority is always preferred. This allows the autoconfiguration to use XInput configs whenever it is required and use the old configurations everywhere else.

  • Learn about pull requests

Comments (0)