mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-02 19:45:35 +00:00
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,
|
||||
bool _logging)
|
||||
{
|
||||
std::string theLogFile("Ogre.log");
|
||||
std::string theCfgFile("ogre.cfg");
|
||||
|
||||
theLogFile.insert(0, logPath);
|
||||
theCfgFile.insert(0, cfgPath);
|
||||
|
||||
// Set up logging first
|
||||
new LogManager;
|
||||
Log *log = LogManager::getSingleton().createLog(theLogFile);
|
||||
Log *log = LogManager::getSingleton().createLog(logPath + std::string("Ogre.log"));
|
||||
logging = _logging;
|
||||
|
||||
if(logging)
|
||||
|
@ -56,19 +50,13 @@ bool OgreRenderer::configure(bool showConfig,
|
|||
// Disable logging
|
||||
log->setDebugOutputEnabled(false);
|
||||
|
||||
mRoot = new Root(pluginCfg, theCfgFile, "");
|
||||
mRoot = new Root(pluginCfg, cfgPath, "");
|
||||
|
||||
// Show the configuration dialog and initialise the system, if the
|
||||
// showConfig parameter is specified. The settings are stored in
|
||||
// ogre.cfg. If showConfig is false, the settings are assumed to
|
||||
// already exist in ogre.cfg.
|
||||
int result;
|
||||
if(showConfig)
|
||||
result = mRoot->showConfigDialog();
|
||||
else
|
||||
result = mRoot->restoreConfig();
|
||||
|
||||
return !result;
|
||||
return (showConfig) ? mRoot->showConfigDialog() : mRoot->restoreConfig();
|
||||
}
|
||||
|
||||
bool OgreRenderer::configure(bool showConfig,
|
||||
|
|
Loading…
Reference in a new issue