diff --git a/apps/launcher/graphicspage.cpp b/apps/launcher/graphicspage.cpp index 779b07607..0074346e7 100644 --- a/apps/launcher/graphicspage.cpp +++ b/apps/launcher/graphicspage.cpp @@ -165,13 +165,25 @@ void GraphicsPage::setupConfig() void GraphicsPage::setupOgre() { QString pluginCfg = "./plugins.cfg"; - QFile file(pluginCfg); if (!file.exists()) { pluginCfg = QString::fromStdString(Files::getPath(Files::Path_ConfigUser, "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("launcherOgre.log", true, false, false); try { @@ -190,8 +202,7 @@ void GraphicsPage::setupOgre() msgBox.setDetailedText(ogreError); msgBox.exec(); - QString error = QString("Error creating Ogre::Root, the error reported was: %0").arg(ogreError); - qCritical(error.toAscii()); + qCritical("Error creating Ogre::Root, the error reported was:\n %s", qPrintable(ogreError)); std::exit(1); } diff --git a/apps/launcher/main.cpp b/apps/launcher/main.cpp index c89a14f5f..4e438a4db 100644 --- a/apps/launcher/main.cpp +++ b/apps/launcher/main.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include "maindialog.hpp" @@ -24,10 +23,6 @@ int main(int argc, char *argv[]) // Load the stylesheet QFile file("./launcher.qss"); - - QFileInfo fi(file); - - qDebug() << "Stylesheet path is: " << fi.absoluteFilePath(); file.open(QFile::ReadOnly); QString styleSheet = QLatin1String(file.readAll());