diff options
author | Zaba999 <qrwfw5rp> | 2012-10-02 21:44:14 +0200 |
---|---|---|
committer | Zaba999 <qrwfw5rp> | 2012-10-02 21:44:14 +0200 |
commit | 4b7ca3f26254f6692d1b17eb0df151382bb3b851 (patch) | |
tree | 2515a2cbb2672b16d0c0a9d0f1af7a3aa91c06db /src/app | |
parent | ac1472621a101205babd33020e5530fa32580eff (diff) | |
download | colobot-4b7ca3f26254f6692d1b17eb0df151382bb3b851.tar.gz colobot-4b7ca3f26254f6692d1b17eb0df151382bb3b851.tar.bz2 colobot-4b7ca3f26254f6692d1b17eb0df151382bb3b851.zip |
Further work on saving profile and directory listing.
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 d6fc2dd..79ccdbf 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); |