From 93727a3fdf543d5699f676772e32311fe8383254 Mon Sep 17 00:00:00 2001 From: Didier 'OdyX' Raboud Date: Thu, 31 Oct 2013 11:10:45 +0100 Subject: 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) --- src/app/app.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/app/app.cpp b/src/app/app.cpp index 404c615..5693148 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -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)) { -- cgit v1.2.3-1-g7c22