1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-19 08:41:35 +00:00

config fix

This commit is contained in:
Marc Zinnschlag 2011-09-27 09:44:42 +02:00
parent 0b1d6d4330
commit 26b9d0fdc3

View file

@ -38,25 +38,31 @@ bool OgreRenderer::configure(bool showConfig,
const std::string &pluginCfg, const std::string &pluginCfg,
bool _logging) bool _logging)
{ {
// Set up logging first // Set up logging first
new LogManager; new LogManager;
Log *log = LogManager::getSingleton().createLog(logPath + std::string("Ogre.log")); Log *log = LogManager::getSingleton().createLog(logPath);
logging = _logging; logging = _logging;
if(logging) if(logging)
// Full log detail // Full log detail
log->setLogDetail(LL_BOREME); log->setLogDetail(LL_BOREME);
else else
// Disable logging // Disable logging
log->setDebugOutputEnabled(false); log->setDebugOutputEnabled(false);
mRoot = new Root(pluginCfg, cfgPath, ""); 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.
return (showConfig) ? !mRoot->showConfigDialog() : !mRoot->restoreConfig(); int result;
if(showConfig)
result = mRoot->showConfigDialog();
else
result = mRoot->restoreConfig();
return !result;
} }
bool OgreRenderer::configure(bool showConfig, bool OgreRenderer::configure(bool showConfig,