Skip to content

Commit

Permalink
Merge pull request #853 from tmyqlfpir/fix-save-info-mod-path
Browse files Browse the repository at this point in the history
Blood: Fix loading save info from mod directory
  • Loading branch information
Hendricks266 authored Oct 9, 2024
2 parents 48e0598 + 07dcc3b commit 8b69179
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/blood/src/loadsave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,9 @@ void MyLoadSave::Save(void)

void LoadSavedInfo(void)
{
auto pList = klistpath("./", "game*.sav", BUILDVFS_FIND_FILE);
int const bakpathsearchmode = pathsearchmode;
pathsearchmode = 1;
auto pList = klistpath((g_modDir[0] != '/') ? g_modDir : "./", "game*.sav", BUILDVFS_FIND_FILE);
int nCount = 0;
for (auto pIterator = pList; pIterator != NULL && nCount < 10; pIterator = pIterator->next, nCount++)
{
Expand Down Expand Up @@ -523,6 +525,7 @@ void LoadSavedInfo(void)
kclose(hFile);
}
klistfree(pList);
pathsearchmode = bakpathsearchmode;
}

void UpdateSavedInfo(int nSlot)
Expand Down Expand Up @@ -570,4 +573,4 @@ void LoadSaveSetup(void)
#ifdef NOONE_EXTENSIONS
nnExtLoadSaveConstruct();
#endif
}
}

0 comments on commit 8b69179

Please sign in to comment.