diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 2162575de..b76087dfa 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ October 29, 2009 +- Fixed: An unspecified save_dir will now save to the program directory on + Windows. (Other operating systems already use the user's home directory + instead.) - Fixed: S_EvictAllChannels() must replace the channel's start time with its position when evicting sounds, because restarting the sound system causes the DSP clock to restart at 0, so start times that were recorded before diff --git a/src/g_game.cpp b/src/g_game.cpp index c617f9804..613b147ba 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -1851,14 +1851,11 @@ FString G_BuildSaveName (const char *prefix, int slot) { leader = save_dir; } + if (leader.IsEmpty()) + { #ifdef unix - if (leader.IsEmpty()) - { leader = "~/" GAME_DIR; - } #elif defined(__APPLE__) - if (leader.IsEmpty()) - { char cpath[PATH_MAX]; FSRef folder; @@ -1867,8 +1864,10 @@ FString G_BuildSaveName (const char *prefix, int slot) { leader << cpath << "/" GAME_DIR "/Savegames/"; } - } +#else + leader = progdir; #endif + } } size_t len = leader.Len(); if (leader[0] != '\0' && leader[len-1] != '\\' && leader[len-1] != '/')