diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-06-24 21:37:15 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-06-24 21:37:15 +0200 |
commit | 7c2e955e1552a9c4e412ea2c936be61fc78ba010 (patch) | |
tree | ee506dfbec54f998d10c385bde3a1c3fa04e66b2 /src/app/system_linux.cpp | |
parent | e218dcfdf2c58f8841e7ebd220527d08e870a6d5 (diff) | |
parent | b376486fd74fa02b0297ceef6d0f977b32358e5e (diff) | |
download | colobot-7c2e955e1552a9c4e412ea2c936be61fc78ba010.tar.gz colobot-7c2e955e1552a9c4e412ea2c936be61fc78ba010.tar.bz2 colobot-7c2e955e1552a9c4e412ea2c936be61fc78ba010.zip |
Colobot Gold 0.1.0-alpha
Diffstat (limited to 'src/app/system_linux.cpp')
-rw-r--r-- | src/app/system_linux.cpp | 31 |
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; } + |