Sort the entries in the controller mapping

This commit is contained in:
Sam Lantinga 2023-07-16 10:19:40 -07:00
parent 787786bdbc
commit f3fe579cf0
2 changed files with 63 additions and 2 deletions

View file

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