Added the ability to specify a gamepad type in the mapping

Also renamed most cases of SDL_GAMEPAD_TYPE_UNKNOWN to SDL_GAMEPAD_TYPE_STANDARD, and SDL_GetGamepadType() will return SDL_GAMEPAD_TYPE_UNKNOWN only if the gamepad is invalid.
This commit is contained in:
Sam Lantinga 2023-07-17 12:14:37 -07:00
parent 57820071a4
commit b271e92c6e
14 changed files with 530 additions and 65 deletions

View file

@ -71,6 +71,10 @@ def save_controller(line):
print("Controller '%s' not unique, skipping" % name)
return
pos = find_element("type", bindings)
if pos >= 0:
bindings.insert(0, bindings.pop(pos))
pos = find_element("platform", bindings)
if pos >= 0:
bindings.insert(0, bindings.pop(pos))