- 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.)


SVN r1950 (trunk)
This commit is contained in:
Randy Heit 2009-10-30 02:42:40 +00:00
parent 50b0340a56
commit 0f96ec4a32
2 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,7 @@
October 29, 2009 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 - Fixed: S_EvictAllChannels() must replace the channel's start time with its
position when evicting sounds, because restarting the sound system causes position when evicting sounds, because restarting the sound system causes
the DSP clock to restart at 0, so start times that were recorded before the DSP clock to restart at 0, so start times that were recorded before

View File

@ -1851,14 +1851,11 @@ FString G_BuildSaveName (const char *prefix, int slot)
{ {
leader = save_dir; leader = save_dir;
} }
if (leader.IsEmpty())
{
#ifdef unix #ifdef unix
if (leader.IsEmpty())
{
leader = "~/" GAME_DIR; leader = "~/" GAME_DIR;
}
#elif defined(__APPLE__) #elif defined(__APPLE__)
if (leader.IsEmpty())
{
char cpath[PATH_MAX]; char cpath[PATH_MAX];
FSRef folder; FSRef folder;
@ -1867,8 +1864,10 @@ FString G_BuildSaveName (const char *prefix, int slot)
{ {
leader << cpath << "/" GAME_DIR "/Savegames/"; leader << cpath << "/" GAME_DIR "/Savegames/";
} }
} #else
leader = progdir;
#endif #endif
}
} }
size_t len = leader.Len(); size_t len = leader.Len();
if (leader[0] != '\0' && leader[len-1] != '\\' && leader[len-1] != '/') if (leader[0] != '\0' && leader[len-1] != '\\' && leader[len-1] != '/')