src/joystick/sort_controllers.py
changeset 9205 5302aee2916a
parent 9203 874b59c43a3f
equal deleted inserted replaced
9204:b331795924d3 9205:5302aee2916a
    38         output.write(line)
    38         output.write(line)
    39     controllers = []
    39     controllers = []
    40     controller_guids = {}
    40     controller_guids = {}
    41 
    41 
    42 for line in input:
    42 for line in input:
    43     if ( parsing_controllers ):
    43     if (parsing_controllers):
    44         if (line.startswith("{")):
    44         if (line.startswith("{")):
    45             output.write(line)
    45             output.write(line)
    46         elif (line.startswith("#endif")):
    46         elif (line.startswith("    NULL")):
    47             parsing_controllers = False
    47             parsing_controllers = False
    48             write_controllers()
    48             write_controllers()
    49             output.write(line)
    49             output.write(line)
    50         elif (line.startswith("#")):
    50         elif (line.startswith("#if")):
    51             print("Parsing " + line.strip())
    51             print("Parsing " + line.strip())
       
    52             output.write(line)
       
    53         elif (line.startswith("#endif")):
    52             write_controllers()
    54             write_controllers()
    53             output.write(line)
    55             output.write(line)
    54         else:
    56         else:
    55             save_controller(line)
    57             save_controller(line)
    56     else:
    58     else: