OSDN Git Service

Use a different log file for x64 and store log files in a temporary directory.
authorKazuhiro Fujieda <fujieda@users.sourceforge.jp>
Thu, 12 May 2011 09:52:33 +0000 (18:52 +0900)
committerKazuhiro Fujieda <fujieda@users.sourceforge.jp>
Thu, 26 May 2011 23:35:35 +0000 (08:35 +0900)
xkeymacsdll/Utils.cpp

index 88eabf5..d216f18 100644 (file)
@@ -746,8 +746,12 @@ void CUtils::Log(LPTSTR fmt, ...)
 \r
        static int n = 0;\r
        TCHAR szPath[MAX_PATH] = {'\0'};\r
-       if (SHGetSpecialFolderPath(NULL, szPath, CSIDL_APPDATA, TRUE)) {\r
+       if (GetTempPath(MAX_PATH, szPath)) {\r
+#ifndef _WIN64\r
                _tmakepath(szPath, NULL, szPath, _T("xkeylog"), _T("txt"));\r
+#else\r
+               _tmakepath(szPath, NULL, szPath, _T("xkeylog64"), _T("txt"));\r
+#endif\r
        } else {\r
                _tcscpy(szPath, _T("c:\\xkeylog.txt"));\r
        }\r