summaryrefslogtreecommitdiff
path: root/core/input/input_builders.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/input/input_builders.py')
-rw-r--r--core/input/input_builders.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/core/input/input_builders.py b/core/input/input_builders.py
index ca142c0c80..6184c5debb 100644
--- a/core/input/input_builders.py
+++ b/core/input/input_builders.py
@@ -12,8 +12,8 @@ def make_default_controller_mappings(target, source, env):
g = open(dst, "w")
g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
- g.write("#include \"core/typedefs.h\"\n")
- g.write("#include \"core/input/default_controller_mappings.h\"\n")
+ g.write('#include "core/typedefs.h"\n')
+ g.write('#include "core/input/default_controller_mappings.h"\n')
# ensure mappings have a consistent order
platform_mappings = OrderedDict()
@@ -37,11 +37,19 @@ def make_default_controller_mappings(target, source, env):
line_parts = line.split(",")
guid = line_parts[0]
if guid in platform_mappings[current_platform]:
- g.write("// WARNING - DATABASE {} OVERWROTE PRIOR MAPPING: {} {}\n".format(src_path, current_platform, platform_mappings[current_platform][guid]))
+ g.write(
+ "// WARNING - DATABASE {} OVERWROTE PRIOR MAPPING: {} {}\n".format(
+ src_path, current_platform, platform_mappings[current_platform][guid]
+ )
+ )
valid_mapping = True
for input_map in line_parts[2:]:
if "+" in input_map or "-" in input_map or "~" in input_map:
- g.write("// WARNING - DISCARDED UNSUPPORTED MAPPING TYPE FROM DATABASE {}: {} {}\n".format(src_path, current_platform, line))
+ g.write(
+ "// WARNING - DISCARDED UNSUPPORTED MAPPING TYPE FROM DATABASE {}: {} {}\n".format(
+ src_path, current_platform, line
+ )
+ )
valid_mapping = False
break
if valid_mapping:
@@ -62,12 +70,12 @@ def make_default_controller_mappings(target, source, env):
variable = platform_variables[platform]
g.write("{}\n".format(variable))
for mapping in mappings.values():
- g.write("\t\"{}\",\n".format(mapping))
+ g.write('\t"{}",\n'.format(mapping))
g.write("#endif\n")
g.write("\tNULL\n};\n")
g.close()
-if __name__ == '__main__':
+if __name__ == "__main__":
subprocess_main(globals())