- Moved autoload initialization to a separate function so that the rest of the ini can be loaded as before. Some platforms do indeed place zdoom.pk3 elsewhere.

This commit is contained in:
Braden Obrzut 2015-04-27 14:15:03 -04:00
commit 9ba5e30bed
5 changed files with 34 additions and 26 deletions

View file

@ -1981,6 +1981,9 @@ static void D_DoomInit()
}
FRandom::StaticClearRandom ();
Printf ("M_LoadDefaults: Load system defaults.\n");
M_LoadDefaults (); // load before initing other systems
}
//==========================================================================
@ -1989,7 +1992,7 @@ static void D_DoomInit()
//
//==========================================================================
static void AddAutoloadFiles(const char *autoname)
static void AddAutoloadFiles(const char *autoname)
{
LumpFilterIWAD.Format("%s.", autoname); // The '.' is appened to simplify parsing the string
@ -2247,8 +2250,8 @@ void D_DoomMain (void)
iwad_man = new FIWadManager;
iwad_man->ParseIWadInfos(basewad);
Printf ("M_LoadDefaults: Load system defaults.\n");
M_LoadDefaults (iwad_man); // load before initing other systems
// Now that we have the IWADINFO, initialize the autoload ini sections.
GameConfig->DoAutoloadSetup(iwad_man);
PClass::StaticInit ();
atterm(FinalGC);
@ -2292,7 +2295,7 @@ void D_DoomMain (void)
FBaseCVar::DisableCallbacks();
GameConfig->DoGameSetup (gameinfo.ConfigName);
AddAutoloadFiles(iwad_info->Autoname);
AddAutoloadFiles(iwad_info->Autoname);
// Process automatically executed files
FExecList *exec;