Index: code/win32/win_local.h =================================================================== --- code/win32/win_local.h (revision 826) +++ code/win32/win_local.h (working copy) @@ -37,6 +37,7 @@ #include #include #include +#include void IN_MouseEvent (int mstate); Index: code/win32/win_shared.c =================================================================== --- code/win32/win_shared.c (revision 826) +++ code/win32/win_shared.c (working copy) @@ -285,7 +285,26 @@ } char *Sys_DefaultHomePath(void) { - return NULL; + TCHAR szPath[MAX_PATH]; + static char path[MAX_OSPATH]; + + if( !SUCCEEDED( SHGetFolderPath( NULL, CSIDL_LOCAL_APPDATA, + NULL, 0, szPath ) ) ) + { + + return NULL; + } + Q_strncpyz( path, szPath, sizeof(path) ); + Q_strcat( path, sizeof(path), "\\Quake3" ); + if( CreateDirectory( path, NULL ) ) + { + if( GetLastError() != ERROR_ALREADY_EXISTS ) + { + Com_Printf("Unable to create directory \"%s\"\n", path); + return NULL; + } + } + return path; } char *Sys_DefaultInstallPath(void)