mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Fixed gamecontroller database sorting script not sorting the whole database.
The script was originally written for an SDL_gamecontrollerdb.h which had groups of mappings separated by single lines starting with a "#". This was changed some time ago to #endif/#if pairs. Because the script assumed only a single #endif in the whole file it no longer worked correctly and only processed the first group.
This commit is contained in:
parent
0c60f023f5
commit
37720dd5f2
@ -43,12 +43,14 @@ for line in input:
|
||||
if (parsing_controllers):
|
||||
if (line.startswith("{")):
|
||||
output.write(line)
|
||||
elif (line.startswith("#endif")):
|
||||
elif (line.startswith(" NULL")):
|
||||
parsing_controllers = False
|
||||
write_controllers()
|
||||
output.write(line)
|
||||
elif (line.startswith("#")):
|
||||
elif (line.startswith("#if")):
|
||||
print("Parsing " + line.strip())
|
||||
output.write(line)
|
||||
elif (line.startswith("#endif")):
|
||||
write_controllers()
|
||||
output.write(line)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user