Create a default user config file if no user config file exists.
This is for now useful for crash problems (e.g. to disable shaders).
This commit is contained in:
parent
ac2619007f
commit
4139d145cf
@ -738,8 +738,13 @@ bool UserConfig::loadConfig()
|
||||
XMLNode* root = file_manager->createXMLTree(filename);
|
||||
if(!root || root->getName() != "stkconfig")
|
||||
{
|
||||
std::cerr << "Could not read user config file file " << filename << std::endl;
|
||||
Log::error("UserConfig",
|
||||
"Could not read user config file '%s'.", filename.c_str());
|
||||
if(root) delete root;
|
||||
// Create a default config file - just in case that stk crashes later
|
||||
// there is a config file that can be modified (to e.g. disable
|
||||
// shaders)
|
||||
saveConfig();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user