summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDidier 'OdyX' Raboud <didier@raboud.com>2013-10-31 11:10:45 +0100
committerDidier 'OdyX' Raboud <didier@raboud.com>2013-11-13 09:35:32 +0100
commit93727a3fdf543d5699f676772e32311fe8383254 (patch)
tree23af39a7c06d4e948d8334df77d5f93fb7c5e59e /src
parente78d2cce18b50ed86933d05ac5bccdf4ef13d6e3 (diff)
downloadcolobot-93727a3fdf543d5699f676772e32311fe8383254.tar.gz
colobot-93727a3fdf543d5699f676772e32311fe8383254.tar.bz2
colobot-93727a3fdf543d5699f676772e32311fe8383254.zip
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)
Diffstat (limited to 'src')
-rw-r--r--src/app/app.cpp7
1 files changed, 7 insertions, 0 deletions
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))
{