MCPcopy Create free account
hub / github.com/ZDoom/Raze / AddAutoexec

Method AddAutoexec

source/core/gameconfigfile.cpp:558–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558void 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
586CCMD (whereisini)
587{

Callers 1

G_ReadConfigFunction · 0.80

Calls 4

stricmpFunction · 0.85
ExpandEnvVarsFunction · 0.85
AppendArgMethod · 0.80
FileExistsFunction · 0.50

Tested by

no test coverage detected