diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-05-10 17:18:56 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-05-10 17:18:56 +0000 |
| commit | 0d3b988c1aed8f6b91879a801253db81a251a532 (patch) | |
| tree | 00f9d5128bff6ee4ec44e5f669b8eecedd55a4a1 /src/engine/e_system.c | |
| parent | ac18c6a3bd9b1e497cd97c52fd77f256961b48e6 (diff) | |
| download | zcatch-0d3b988c1aed8f6b91879a801253db81a251a532.tar.gz zcatch-0d3b988c1aed8f6b91879a801253db81a251a532.zip | |
major changes to the build script, requires new bam
Diffstat (limited to 'src/engine/e_system.c')
| -rw-r--r-- | src/engine/e_system.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/engine/e_system.c b/src/engine/e_system.c index f87fd6f3..c0d3595c 100644 --- a/src/engine/e_system.c +++ b/src/engine/e_system.c @@ -29,11 +29,10 @@ #include <unistd.h> #elif defined(CONF_FAMILY_WINDOWS) #define WIN32_LEAN_AND_MEAN - #define _WIN32_WINNT 0x0400 + #define _WIN32_WINNT 0x0501 /* required for mingw to get getaddrinfo to work */ #include <windows.h> #include <winsock2.h> #include <ws2tcpip.h> - #include <shlobj.h> /* for SHGetFolderPathAndSubDir */ #include <fcntl.h> #include <direct.h> #include <errno.h> @@ -761,10 +760,9 @@ int fs_storage_path(const char *appname, char *path, int max) { #if defined(CONF_FAMILY_WINDOWS) HRESULT r; - char home[MAX_PATH]; - r = SHGetFolderPath (NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, home); - if(r != 0) - return 1; + char *home = getenv("APPDATA"); + if(!home) + return 1; _snprintf(path, max, "%s/%s", home, appname); return 0; #else |