| 556 | } |
| 557 | |
| 558 | void FGameConfigFile::AddAutoexec (FArgs *list, const char *game) |
| 559 | { |
| 560 | char section[64]; |
| 561 | const char *key; |
| 562 | const char *value; |
| 563 | |
| 564 | snprintf (section, countof(section), "%s.AutoExec", game); |
| 565 | |
| 566 | // If <game>.AutoLoad section does not exist, create it |
| 567 | // with a default autoexec.cfg file present. |
| 568 | CreateStandardAutoExec(section, false); |
| 569 | // Run any files listed in the <game>.AutoLoad section |
| 570 | if (!SectionIsEmpty()) |
| 571 | { |
| 572 | while (NextInSection (key, value)) |
| 573 | { |
| 574 | if (stricmp (key, "Path") == 0 && *value != '\0') |
| 575 | { |
| 576 | FString expanded_path = ExpandEnvVars(value); |
| 577 | if (FileExists(expanded_path)) |
| 578 | { |
| 579 | list->AppendArg (ExpandEnvVars(value)); |
| 580 | } |
| 581 | } |
| 582 | } |
| 583 | } |
| 584 | } |
| 585 | |
| 586 | CCMD (whereisini) |
| 587 | { |
no test coverage detected