Copy the saved wad directory to srb2path

This commit is contained in:
James R 2020-08-17 21:27:59 -07:00
parent c0cac645f8
commit 1bf0794d6a
1 changed files with 3 additions and 4 deletions

View File

@ -3802,16 +3802,15 @@ boolean I_UseSavedWadDirectory(void)
{
boolean ok = false;
#ifdef _WIN32
char path[MAX_PATH];
FILE * file = openAppDataFile("lastwaddir", "r");
if (file != NULL)
{
if (fgets(path, sizeof path, file) != NULL)
if (fgets(srb2path, sizeof srb2path, file) != NULL)
{
I_OutputMsg(
"Going to the last known directory with srb2.srb: %s\n",
path);
ok = SetCurrentDirectoryA(path);
srb2path);
ok = SetCurrentDirectoryA(srb2path);
}
fclose(file);
}