1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-19 17:39:44 +00:00

Changed plugins.cfg lookup code to include the global directory

This commit is contained in:
Pieter van der Kloet 2011-07-31 19:17:52 +02:00
parent 8c4a246abd
commit 88edbad717

View file

@ -165,7 +165,6 @@ void GraphicsPage::setupConfig()
void GraphicsPage::setupOgre()
{
QString pluginCfg = "./plugins.cfg";
QFile file(pluginCfg);
if (!file.exists()) {
@ -173,9 +172,18 @@ void GraphicsPage::setupOgre()
"openmw", "plugins.cfg"));
}
// Reopen the file from user directory
file.setFileName(pluginCfg);
if (!file.exists()) {
// There's no plugins.cfg in the user directory, use global directory
pluginCfg = QString::fromStdString(Files::getPath(Files::Path_ConfigGlobal,
"openmw", "plugins.cfg"));
}
// Create a log manager so we can surpress debug text to stdout/stderr
Ogre::LogManager* logMgr = OGRE_NEW Ogre::LogManager;
logMgr->createLog("Ogre.log", true, false, false);
logMgr->createLog("launcherOgre.log", true, false, false);
try
{