Skip to content

Commit

Permalink
Minor paths cleanup before a bigger one
Browse files Browse the repository at this point in the history
  • Loading branch information
PiKeyAr committed Feb 2, 2025
1 parent c21e5fa commit a3739ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions SADXModLoader/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ void LoadModLoaderSettings(LoaderSettings* loaderSettings, std::wstring appPath,
DisplaySettingsLoadError(gamePath, appPath, currentProfilePath);
}


std::ifstream ifs_p(appPath + profileFolderName + profname_w);
std::ifstream ifs_p(currentProfilePath);
json json_config = json::parse(ifs_p);
int settingsVersion = json_config.value("SettingsVersion", 0);

Expand Down
4 changes: 1 addition & 3 deletions SADXModLoader/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ static void SetManagerConfigFolder(wstring& exepath, wstring& appPath, wstring&

appPath = exepath + L"\\mods\\.modloader\\";
extLibPath = appPath + L"extlib\\";
wstring profilesPath = appPath + L"profiles\\Profiles.json";
wstring profilesPath = appPath + L"profiles\\Profiles.json"; // Only used in the first check and the error message

// Success
if (Exists(profilesPath))
Expand All @@ -856,7 +856,6 @@ static void SetManagerConfigFolder(wstring& exepath, wstring& appPath, wstring&
{
appPath = exepath + L"\\SAManager\\";
extLibPath = appPath + L"extlib\\";
profilesPath = appPath + L"SADX\\Profiles.json";
return;
}
// If 'checkProfilesPath' doesn't exist either, assume the settings are in 'AppData\Local\SAManager'
Expand All @@ -872,7 +871,6 @@ static void SetManagerConfigFolder(wstring& exepath, wstring& appPath, wstring&
{
appPath = appDataLocalPath + L"\\SAManager\\";
extLibPath = appPath + L"extlib\\";
profilesPath = appPath + L"SADX\\Profiles.json";
return;
}
// If it still can't be found, display an error message
Expand Down

0 comments on commit a3739ed

Please sign in to comment.