From c4df0bb5b18815d5564eb56007ffdba60c47fa0f Mon Sep 17 00:00:00 2001 From: danij Date: Thu, 9 Jan 2014 16:27:27 +0000 Subject: [PATCH] Fixed|Console: Do not warn about non-existent autoexec/startup config files --- doomsday/client/src/con_config.cpp | 2 +- doomsday/client/src/dd_main.cpp | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doomsday/client/src/con_config.cpp b/doomsday/client/src/con_config.cpp index f17a9eccf8..d3178c928f 100644 --- a/doomsday/client/src/con_config.cpp +++ b/doomsday/client/src/con_config.cpp @@ -242,7 +242,7 @@ bool Con_ParseCommands(char const *fileName, int flags) filehandle_s *file = F_Open(fileName, "rt"); if(!file) { - LOG_SCR_WARNING("Could not open \"%s\"") << fileName; + LOG_SCR_WARNING("Failed to open \"%s\" for write") << fileName; return false; } diff --git a/doomsday/client/src/dd_main.cpp b/doomsday/client/src/dd_main.cpp index ff24af056b..144b05aa06 100644 --- a/doomsday/client/src/dd_main.cpp +++ b/doomsday/client/src/dd_main.cpp @@ -1880,7 +1880,11 @@ boolean DD_Init(void) // Try to load the autoexec file. This is done here to make sure everything is // initialized: the user can do here anything that s/he'd be able to do in-game // provided a game was loaded during startup. - Con_ParseCommands("autoexec.cfg"); + char const *autoexecConfig = "autoexec.cfg"; + if(F_FileExists(autoexecConfig)) + { + Con_ParseCommands(autoexecConfig); + } // Read additional config files that should be processed post engine init. if(CommandLine_CheckWith("-parse", 1)) @@ -2056,7 +2060,11 @@ static int DD_StartupWorker(void * /*context*/) Con_SetProgress(60); // Execute the startup script (Startup.cfg). - Con_ParseCommands("startup.cfg"); + char const *startupConfig = "startup.cfg"; + if(F_FileExists(startupConfig)) + { + Con_ParseCommands(startupConfig); + } Con_SetProgress(90); R_BuildTexGammaLut();