From c903fc7eb95bda1991360d8dc24b3e363540809d Mon Sep 17 00:00:00 2001 From: Dennis Schridde Date: Fri, 18 Jan 2008 00:36:28 +0000 Subject: [PATCH] Save WZ stuff in "My Games" on Windows. As pointed out by doom3r in http://forums.wz2100.net/?topic=1314.0 Windows doesn't seem to have CSIDL for this? Can we retrieve the name "My Games" from somewhere else? git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3503 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index d0d1df6ce..c27bc7755 100644 --- a/src/main.c +++ b/src/main.c @@ -256,7 +256,11 @@ static void getPlatformUserDir(char * const tmpstr, size_t const size) #if defined(WZ_OS_WIN) ASSERT(size >= MAX_PATH, "size (%u) is smaller than the required minimum of MAX_PATH (%u)", size, (size_t)MAX_PATH); if ( SUCCEEDED( SHGetFolderPathA( NULL, CSIDL_PERSONAL|CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, tmpstr ) ) ) + { strlcat(tmpstr, PHYSFS_getDirSeparator(), size); + strlcat(tmpstr, "My Games", size); + strlcat(tmpstr, PHYSFS_getDirSeparator(), size); + } else #elif defined(WZ_OS_MAC) short vol_ref;