forked from mirror/openmw-tes3mp
Changed plugins.cfg lookup code to include the global directory
This commit is contained in:
parent
8c4a246abd
commit
88edbad717
1 changed files with 10 additions and 2 deletions
|
@ -165,7 +165,6 @@ void GraphicsPage::setupConfig()
|
||||||
void GraphicsPage::setupOgre()
|
void GraphicsPage::setupOgre()
|
||||||
{
|
{
|
||||||
QString pluginCfg = "./plugins.cfg";
|
QString pluginCfg = "./plugins.cfg";
|
||||||
|
|
||||||
QFile file(pluginCfg);
|
QFile file(pluginCfg);
|
||||||
|
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
|
@ -173,9 +172,18 @@ void GraphicsPage::setupOgre()
|
||||||
"openmw", "plugins.cfg"));
|
"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
|
// Create a log manager so we can surpress debug text to stdout/stderr
|
||||||
Ogre::LogManager* logMgr = OGRE_NEW Ogre::LogManager;
|
Ogre::LogManager* logMgr = OGRE_NEW Ogre::LogManager;
|
||||||
logMgr->createLog("Ogre.log", true, false, false);
|
logMgr->createLog("launcherOgre.log", true, false, false);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue