forked from teamnwah/openmw-tes3coop
Issue #168: Configuration cleanup, part 2
Updated configure() method. Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
This commit is contained in:
parent
0f7d59b4fb
commit
d62fd96cd5
1 changed files with 12 additions and 24 deletions
|
@ -38,15 +38,9 @@ bool OgreRenderer::configure(bool showConfig,
|
||||||
const std::string &pluginCfg,
|
const std::string &pluginCfg,
|
||||||
bool _logging)
|
bool _logging)
|
||||||
{
|
{
|
||||||
std::string theLogFile("Ogre.log");
|
|
||||||
std::string theCfgFile("ogre.cfg");
|
|
||||||
|
|
||||||
theLogFile.insert(0, logPath);
|
|
||||||
theCfgFile.insert(0, cfgPath);
|
|
||||||
|
|
||||||
// Set up logging first
|
// Set up logging first
|
||||||
new LogManager;
|
new LogManager;
|
||||||
Log *log = LogManager::getSingleton().createLog(theLogFile);
|
Log *log = LogManager::getSingleton().createLog(logPath + std::string("Ogre.log"));
|
||||||
logging = _logging;
|
logging = _logging;
|
||||||
|
|
||||||
if(logging)
|
if(logging)
|
||||||
|
@ -56,19 +50,13 @@ bool OgreRenderer::configure(bool showConfig,
|
||||||
// Disable logging
|
// Disable logging
|
||||||
log->setDebugOutputEnabled(false);
|
log->setDebugOutputEnabled(false);
|
||||||
|
|
||||||
mRoot = new Root(pluginCfg, theCfgFile, "");
|
mRoot = new Root(pluginCfg, cfgPath, "");
|
||||||
|
|
||||||
// Show the configuration dialog and initialise the system, if the
|
// Show the configuration dialog and initialise the system, if the
|
||||||
// showConfig parameter is specified. The settings are stored in
|
// showConfig parameter is specified. The settings are stored in
|
||||||
// ogre.cfg. If showConfig is false, the settings are assumed to
|
// ogre.cfg. If showConfig is false, the settings are assumed to
|
||||||
// already exist in ogre.cfg.
|
// already exist in ogre.cfg.
|
||||||
int result;
|
return (showConfig) ? mRoot->showConfigDialog() : mRoot->restoreConfig();
|
||||||
if(showConfig)
|
|
||||||
result = mRoot->showConfigDialog();
|
|
||||||
else
|
|
||||||
result = mRoot->restoreConfig();
|
|
||||||
|
|
||||||
return !result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OgreRenderer::configure(bool showConfig,
|
bool OgreRenderer::configure(bool showConfig,
|
||||||
|
|
Loading…
Reference in a new issue