mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 07:45:39 +00:00
Fix Ogre being initialised twice
This commit is contained in:
parent
e5a6049ea7
commit
c6558fe487
2 changed files with 4 additions and 1 deletions
|
@ -137,6 +137,7 @@ bool Launcher::GraphicsPage::setupSDL()
|
|||
return false;
|
||||
}
|
||||
|
||||
screenComboBox->clear();
|
||||
for (int i = 0; i < displays; i++)
|
||||
{
|
||||
screenComboBox->addItem(QString(tr("Screen ")) + QString::number(i + 1));
|
||||
|
@ -149,7 +150,7 @@ bool Launcher::GraphicsPage::loadSettings()
|
|||
{
|
||||
if (!setupSDL())
|
||||
return false;
|
||||
if (!setupOgre())
|
||||
if (!mOgre && !setupOgre())
|
||||
return false;
|
||||
|
||||
if (mGraphicsSettings.value(QString("Video/vsync")) == QLatin1String("true"))
|
||||
|
|
|
@ -94,6 +94,8 @@ namespace OgreInit
|
|||
|
||||
Ogre::Root* OgreInit::init(const std::string &logPath)
|
||||
{
|
||||
if (mRoot)
|
||||
throw std::runtime_error("OgreInit was already initialised");
|
||||
|
||||
#ifndef ANDROID
|
||||
// Set up logging first
|
||||
|
|
Loading…
Reference in a new issue