summaryrefslogtreecommitdiffstats
path: root/src/app/app.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2013-11-03 13:04:57 +0100
committerPiotr Dziwinski <piotrdz@gmail.com>2013-11-03 13:04:57 +0100
commitf1c5cd5f82d33d5db5033ea28e1d24a13b2e28a2 (patch)
treeb9e7e75a2138875ffed59772a2a1c7cf82b7aaa4 /src/app/app.cpp
parentec38c14ee8293b2dc7436e0c06b0c294652c84cc (diff)
parentd8e50e4eeb2dde3e0d228e2bead29d73494f8874 (diff)
downloadcolobot-f1c5cd5f82d33d5db5033ea28e1d24a13b2e28a2.tar.gz
colobot-f1c5cd5f82d33d5db5033ea28e1d24a13b2e28a2.tar.bz2
colobot-f1c5cd5f82d33d5db5033ea28e1d24a13b2e28a2.zip
Colobot Gold 0.1.1-alpha
Diffstat (limited to 'src/app/app.cpp')
-rw-r--r--src/app/app.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp
index f98e0fc..d2994a9 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";
@@ -344,7 +345,8 @@ ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[])
case OPT_DATADIR:
{
m_dataPath = optarg;
- GetLogger()->Info("Using custom data dir: '%s'\n", m_dataPath.c_str());
+ m_customDataPath = true;
+ GetLogger()->Info("Using custom datadir or running mod: '%s'\n", m_dataPath.c_str());
break;
}
case OPT_LANGDIR:
@@ -404,7 +406,7 @@ bool CApplication::Create()
}
else
{
- if (GetProfile().GetLocalProfileString("Resources", "Data", path))
+ if (!m_customDataPath && GetProfile().GetLocalProfileString("Resources", "Data", path))
m_dataPath = path;
}
@@ -440,7 +442,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);
}
@@ -449,7 +451,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);
}