summaryrefslogtreecommitdiffstats
path: root/src/app/system_linux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/system_linux.cpp')
-rw-r--r--src/app/system_linux.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/app/system_linux.cpp b/src/app/system_linux.cpp
index 01dd850..492af7d 100644
--- a/src/app/system_linux.cpp
+++ b/src/app/system_linux.cpp
@@ -95,9 +95,9 @@ long long CSystemUtilsLinux::TimeStampExactDiff(SystemTimeStamp *before, SystemT
(after->clockTime.tv_sec - before->clockTime.tv_sec) * 1000000000ll;
}
-std::string CSystemUtilsLinux::profileFileLocation()
+std::string CSystemUtilsLinux::GetProfileFileLocation()
{
- std::string m_profileFile;
+ std::string profileFile;
// Determine profileFile according to XDG Base Directory Specification
char* envXDG_CONFIG_HOME = getenv("XDG_CONFIG_HOME");
@@ -106,25 +106,25 @@ std::string CSystemUtilsLinux::profileFileLocation()
char *envHOME = getenv("HOME");
if (envHOME == NULL)
{
- m_profileFile = "colobot.ini";
+ profileFile = "colobot.ini";
}
else
{
- m_profileFile = std::string(envHOME) + "/.config/colobot.ini";
+ profileFile = std::string(envHOME) + "/.config/colobot.ini";
}
}
else
{
- m_profileFile = std::string(envXDG_CONFIG_HOME) + "/colobot.ini";
+ profileFile = std::string(envXDG_CONFIG_HOME) + "/colobot.ini";
}
- GetLogger()->Trace("Profile configuration is %s\n", m_profileFile.c_str());
+ GetLogger()->Trace("Profile configuration is %s\n", profileFile.c_str());
- return m_profileFile;
+ return profileFile;
}
-std::string CSystemUtilsLinux::savegameDirectoryLocation()
+std::string CSystemUtilsLinux::GetSavegameDirectoryLocation()
{
- std::string m_savegameDir;
+ std::string savegameDir;
// Determine savegame dir according to XDG Base Directory Specification
char *envXDG_DATA_HOME = getenv("XDG_CONFIG_DATA");
@@ -133,18 +133,19 @@ std::string CSystemUtilsLinux::savegameDirectoryLocation()
char *envHOME = getenv("HOME");
if (envHOME == NULL)
{
- m_savegameDir = "/tmp/colobot-savegame";
+ savegameDir = "/tmp/colobot-savegame";
}
else
- {
- m_savegameDir = std::string(envHOME) + "/.local/share/colobot";
+ {
+ savegameDir = std::string(envHOME) + "/.local/share/colobot";
}
}
else
{
- m_savegameDir = std::string(envXDG_DATA_HOME) + "/colobot";
+ savegameDir = std::string(envXDG_DATA_HOME) + "/colobot";
}
- GetLogger()->Trace("Saved game files are going to %s\n", m_savegameDir.c_str());
+ GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str());
- return m_savegameDir;
+ return savegameDir;
}
+