summaryrefslogtreecommitdiffstats
path: root/src/app/app.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/app.cpp')
-rw-r--r--src/app/app.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 3bcb09d..04c028d 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -110,6 +110,7 @@ CApplication::CApplication()
m_exitCode = 0;
m_active = false;
m_debugModes = 0;
+ m_customDataPath = false;
m_windowTitle = "COLOBOT";
@@ -346,6 +347,7 @@ ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[])
case OPT_DATADIR:
{
m_dataPath = optarg;
+ m_customDataPath = true;
GetLogger()->Info("Using custom datadir or running mod: '%s'\n", m_dataPath.c_str());
break;
}
@@ -406,7 +408,7 @@ bool CApplication::Create()
}
else
{
- if (GetProfile().GetLocalProfileString("Resources", "Data", path))
+ if (!m_customDataPath && GetProfile().GetLocalProfileString("Resources", "Data", path))
m_dataPath = path;
}
@@ -442,7 +444,7 @@ bool CApplication::Create()
GetProfile().SetLocalProfileString("Resources", "Music", GetDataSubdirPath(DIR_MUSIC));
}
- if (GetProfile().GetLocalProfileString("Resources", "Sound", path))
+ if (!m_customDataPath && GetProfile().GetLocalProfileString("Resources", "Sound", path))
{
m_sound->CacheAll(path);
}
@@ -451,7 +453,7 @@ bool CApplication::Create()
m_sound->CacheAll(GetDataSubdirPath(DIR_SOUND));
}
- if (GetProfile().GetLocalProfileString("Resources", "Music", path))
+ if (!m_customDataPath && GetProfile().GetLocalProfileString("Resources", "Music", path))
{
m_sound->AddMusicFiles(path);
}