On MacOSX, don't cache the Data, Sound and Music paths

As users can potentially move the bundle around, it doesn't make sense to cache these

(It would probably make sense to drop this caching on all architectures, but it's only on MacOSX where it hurts most)
dev-ui
Didier 'OdyX' Raboud 2013-10-31 11:10:45 +01:00
parent e78d2cce18
commit 93727a3fdf
1 changed files with 7 additions and 0 deletions

View File

@ -423,7 +423,10 @@ bool CApplication::Create()
return false;
}
#if !defined(PLATFORM_MACOSX)
// On Mac OSX, the bundle can potentially change place, it doesn't make sense to cache it to the configuration file
GetProfile().SetLocalProfileString("Resources", "Data", m_dataPath);
#endif
SetLanguage(m_language);
@ -437,12 +440,16 @@ bool CApplication::Create()
m_sound->Create(true);
#if !defined(PLATFORM_MACOSX)
// On Mac OSX, the bundle can potentially change place, it doesn't make sense to cache it to the configuration file
// Cache sound files
if (defaultValues)
{
GetProfile().SetLocalProfileString("Resources", "Sound", GetDataSubdirPath(DIR_SOUND));
GetProfile().SetLocalProfileString("Resources", "Music", GetDataSubdirPath(DIR_MUSIC));
}
#endif
if (!m_customDataPath && GetProfile().GetLocalProfileString("Resources", "Sound", path))
{