From 4b7ca3f26254f6692d1b17eb0df151382bb3b851 Mon Sep 17 00:00:00 2001 From: Zaba999 Date: Tue, 2 Oct 2012 21:44:14 +0200 Subject: Further work on saving profile and directory listing. --- src/app/app.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/app') 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(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); -- cgit v1.2.3-1-g7c22