Do not multithread loading the first config

Resolution in particular relies on this to be done in order...
This commit is contained in:
James R 2020-08-16 22:44:42 -07:00
parent 680d802d10
commit 2f32891919
2 changed files with 10 additions and 3 deletions

View file

@ -778,11 +778,18 @@ static void COM_Exec_f(void)
ctx->noerror = COM_CheckParm("-noerror");
ctx->silent = COM_CheckParm("-silent");
if (COM_CheckParm("-singlethread"))
{
COM_Exec_Thread(ctx);
}
else
{
#ifdef HAVE_THREADS
I_spawn_thread("exec-command", (I_thread_fn)COM_Exec_Thread, ctx);
I_spawn_thread("exec-command", (I_thread_fn)COM_Exec_Thread, ctx);
#else
COM_Exec_Thread(ctx);
COM_Exec_Thread(ctx);
#endif
}
}

View file

@ -507,7 +507,7 @@ void M_FirstLoadConfig(void)
CV_InitFilterVar();
// load config, make sure those commands doesnt require the screen...
COM_BufInsertText(va("exec \"%s\"\n", configfile));
COM_BufInsertText(va("exec \"%s\" -singlethread\n", configfile));
// no COM_BufExecute() needed; that does it right away
// don't filter anymore vars and don't let this convsvar be changed