diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-10-02 22:17:30 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-10-02 22:17:30 +0200 |
commit | 3f7f013168e62693601ab57108d329ffaa924439 (patch) | |
tree | 97c55730d6ffb96dccfde35a01308fa4f2c8f6ef /src/app | |
parent | ba3dce3aed8ade76901dc0cbf228b5cb81d8c2a5 (diff) | |
parent | 4b7ca3f26254f6692d1b17eb0df151382bb3b851 (diff) | |
download | colobot-3f7f013168e62693601ab57108d329ffaa924439.tar.gz colobot-3f7f013168e62693601ab57108d329ffaa924439.tar.bz2 colobot-3f7f013168e62693601ab57108d329ffaa924439.zip |
Merge branch 'dev' into dev-graphics
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/app.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp index 187219e..81d874d 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -327,24 +327,24 @@ bool CApplication::Create() m_deviceConfig.fullScreen = false; //Create the sound instance. - if (!GetProfile()->InitCurrentDirectory()) { + if (!GetProfile().InitCurrentDirectory()) { GetLogger()->Warn("Config not found. Default values will be used!\n"); m_sound = new CSoundInterface(); } else { std::string path; - if (GetProfile()->GetLocalProfileString("Resources", "Data", path)) + if (GetProfile().GetLocalProfileString("Resources", "Data", path)) m_dataPath = path; m_pluginManager->LoadFromProfile(); m_sound = static_cast<CSoundInterface*>(CInstanceManager::GetInstancePointer()->SearchInstance(CLASS_SOUND)); if (!m_sound) { - GetLogger()->Error("Sound not loaded!\n"); - return false; + GetLogger()->Error("Sound not loaded, falling back to fake sound!\n"); + m_sound = new CSoundInterface(); } m_sound->Create(true); - if (GetProfile()->GetLocalProfileString("Resources", "Sound", path)) + if (GetProfile().GetLocalProfileString("Resources", "Sound", path)) m_sound->CacheAll(path); else m_sound->CacheAll(m_dataPath); |