Skip to content

Commit

Permalink
Fix can't install patch after inactive
Browse files Browse the repository at this point in the history
  • Loading branch information
Laeng committed Oct 24, 2023
1 parent f07c7a8 commit 019cb9b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions SCTools/SCTool_Redesigned/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -560,14 +560,20 @@ private void SetInstallbtnLabel()
var localizationFile = Path.Combine(gameFolder, "data", "Localization", App.Settings.GetOfficialLanauages()[App.Settings.GameLanguage], "global.ini");
var userConfigPath = Path.Combine(gameFolder, "user.cfg");

if (patch.IsEnabled == PatchLanguageManager.IsEnabled(userConfigPath) && File.Exists(localizationFile))
var isPatchEnable = PatchLanguageManager.IsEnabled(userConfigPath);

if (patch.IsEnabled && isPatchEnable && File.Exists(localizationFile))
{
installed++;
}
else
{
mismatch++;
if (patch.IsEnabled == isPatchEnable)
{
mismatch++;
}
}

}
}

Expand Down

0 comments on commit 019cb9b

Please sign in to comment.