[colobot] 285/390: Fixed USERPROFILE encoding, final fix to #414
Didier Raboud
odyx at moszumanska.debian.org
Fri Jun 12 14:21:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch upstream/latest
in repository colobot.
commit f9bdd32812abc588ec801e31b299daf401975ee2
Author: krzys-h <krzys_h at interia.pl>
Date: Sun Mar 22 14:07:38 2015 +0100
Fixed USERPROFILE encoding, final fix to #414
---
src/app/system_windows.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/system_windows.cpp b/src/app/system_windows.cpp
index a2ea18f..bc1fed9 100644
--- a/src/app/system_windows.cpp
+++ b/src/app/system_windows.cpp
@@ -117,14 +117,14 @@ std::string CSystemUtilsWindows::GetSaveDir()
{
std::string savegameDir;
- char* envUSERPROFILE = getenv("USERPROFILE");
+ wchar_t* envUSERPROFILE = _wgetenv(L"USERPROFILE");
if (envUSERPROFILE == NULL)
{
- savegameDir = "save";
+ savegameDir = "./saves";
}
else
{
- savegameDir = std::string(envUSERPROFILE) + "\\colobot";
+ savegameDir = UTF8_Encode(std::wstring(envUSERPROFILE)) + "\\colobot";
}
GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str());
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list