mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Removed AutoSearchPath from ddraw.ini
* the folder path for auto-loading custom files is now constant.
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ UseCommandLine=0
|
||||
;Path to the folder in which the game will automatically search and load custom files (by *.dat mask, including folders)
|
||||
;The data load order of the files in the folder will be in reverse alphabetical order of the filenames
|
||||
;The files placed in this folder will have higher priority than the PatchFileXX options
|
||||
;Uncomment the option to specify a different folder path. The default path is <GameRoot>\mods\
|
||||
;This option is not used since v4.2.6. The default path is <GameRoot>\mods\
|
||||
;AutoSearchPath=mods
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
@@ -213,14 +213,14 @@ static void GetExtraPatches() {
|
||||
if (patch.empty() || !NormalizePath(patch) || GetFileAttributes(patch.c_str()) == INVALID_FILE_ATTRIBUTES) continue;
|
||||
patchFiles.push_back(patch);
|
||||
}
|
||||
std::string searchPath = GetConfigString("ExtraPatches", "AutoSearchPath", "mods\\", MAX_PATH);
|
||||
if (!searchPath.empty() && NormalizePath(searchPath)) {
|
||||
if (searchPath.back() != '\\') searchPath += "\\";
|
||||
std::string searchPath = "mods\\"; //GetConfigString("ExtraPatches", "AutoSearchPath", "mods\\", MAX_PATH);
|
||||
//if (!searchPath.empty() && NormalizePath(searchPath)) {
|
||||
//if (searchPath.back() != '\\') searchPath += "\\";
|
||||
|
||||
std::string path(".\\" + searchPath + "*.dat");
|
||||
std::string pathMask(".\\mods\\*.dat");
|
||||
dlogr("Loading custom patches:", DL_MAIN);
|
||||
WIN32_FIND_DATA findData;
|
||||
HANDLE hFind = FindFirstFile(path.c_str(), &findData);
|
||||
HANDLE hFind = FindFirstFile(pathMask.c_str(), &findData);
|
||||
if (hFind != INVALID_HANDLE_VALUE) {
|
||||
do {
|
||||
std::string name(searchPath + findData.cFileName);
|
||||
@@ -230,7 +230,7 @@ static void GetExtraPatches() {
|
||||
} while (FindNextFile(hFind, &findData));
|
||||
FindClose(hFind);
|
||||
}
|
||||
}
|
||||
//}
|
||||
// Remove first duplicates
|
||||
size_t size = patchFiles.size();
|
||||
for (size_t i = 1; i < size; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user