MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / print_argloader_options

Function print_argloader_options

FEXCore/Scripts/config_generator.py:364–397  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

362 output_argloader.write("\n");
363
364def print_argloader_options(options):
365 output_argloader.write("#ifdef BEFORE_PARSE\n")
366 output_argloader.write("#undef BEFORE_PARSE\n")
367 for op_group, group_vals in options.items():
368 for op_key, op_vals in group_vals.items():
369 default = op_vals["Default"]
370
371 if (op_vals["Type"] == "str" or op_vals["Type"] == "strarray" or op_vals["Type"] == "strenum"):
372 # Wrap the string argument in quotes
373 default = "\"" + default + "\""
374
375 # Textual default rather than enum based
376 if ("TextDefault" in op_vals):
377 default = "\"" + op_vals["TextDefault"] + "\""
378
379 short = None
380 choices = None
381
382 if ("ShortArg" in op_vals):
383 short = op_vals["ShortArg"]
384 if ("Choices" in op_vals):
385 choices = op_vals["Choices"]
386
387 print_config_option(
388 op_vals["Type"],
389 op_group,
390 op_key,
391 default,
392 short,
393 choices,
394 op_vals["Desc"])
395
396 output_argloader.write("\n")
397 output_argloader.write("#endif\n")
398
399def print_parse_argloader_options(options):
400 output_argloader.write("#ifdef AFTER_PARSE\n")

Callers 1

Calls 1

print_config_optionFunction · 0.85

Tested by

no test coverage detected