access duplicated keys in VDF correctly

This commit is contained in:
anadius 2024-11-23 19:58:24 +01:00 committed by GitHub
parent bec23b21c8
commit 0c52e130b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,14 +31,12 @@ keymap_digital = {
def add_input_bindings(group, bindings, force_binding=None, keymap=keymap_digital): def add_input_bindings(group, bindings, force_binding=None, keymap=keymap_digital):
if "inputs" not in group: if "inputs" not in group:
return bindings return bindings
for i in group["inputs"]: for i, i_val in group["inputs"].iteritems():
for act in group["inputs"][i]: for act in i_val.itervalues():
for fp in group["inputs"][i][act]: for fp in act.itervalues():
for bd in group["inputs"][i][act][fp]: for bd in fp.itervalues():
for bbd in group["inputs"][i][act][fp][bd]: for bbd, ss in bd.iteritems():
if bbd.lower() == 'binding': if bbd.lower() == 'binding':
x = group["inputs"][i][act][fp][bd].get_all_for(bbd)
for ss in x:
st = ss.split() st = ss.split()
supported_binding = False supported_binding = False
if st[0].lower() == 'game_action': if st[0].lower() == 'game_action':