INNER CODE UNIT · Python

save_controller

cadaver/turso3d · ThirdParty/SDL/src/joystick/sort_controllers.py:47

def save_controller(line):
    global controllers
    match = split_pattern.match(line)
    entry = [ match.group(1), match.group(2), match.group(3) ]
    bindings = sorted(match.group(4).split(","))
    if (bindings[0] == ""):
        bindings.pop(0)

    name = entry[2].rstrip(',')

    crc = ""
    pos = find_element("crc:", bindings)
    if pos >= 0:
        crc = bindings[pos] + ","
        bindings.pop(pos)

    guid_match = standard_guid_pattern.match(entry[1])
    if guid_match:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…