Skip to content

Commit

Permalink
Final adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
Sora-yx committed Feb 12, 2025
1 parent 0d4189d commit fff01c4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions SA-Mod-Manager/UI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ private void SaveAndPlayButton_Click(object sender, RoutedEventArgs e)
Save();
Refresh();

if (ModDependency.CheckDependencies(EnabledMods, mods))

if (App.CurrentGame.id == GameEntry.GameType.Unsupported || ModDependency.CheckDependencies(EnabledMods, mods))
return;

StartGame();
Expand Down Expand Up @@ -1101,9 +1102,10 @@ private async Task<bool> ResultPickGame(string path)
UIHelper.ToggleButton(ref btnOpenGameDir, true);
suppressEvent = true;

ComboGameSelection.SelectedItem = game;
if (DoGameSwap((Game)ComboGameSelection.SelectedItem, path))

if (DoGameSwap((Game)game, path))
{
ComboGameSelection.SelectedValue = App.CurrentGame;
await ForceInstallLoader();
SetBindings();
}
Expand Down Expand Up @@ -1148,7 +1150,7 @@ private async void btnCheckUpdates_Click(object sender, RoutedEventArgs e)
return;
}

if (App.CurrentGame.loader.installed)
if (App.CurrentGame.id != GameEntry.GameType.Unsupported && App.CurrentGame.loader.installed)
{
await App.PerformUpdateLoaderCheck();

Expand Down Expand Up @@ -1282,7 +1284,7 @@ private void comboLanguage_SelectionChanged(object sender, SelectionChangedEvent

private void btnProfileSettings_Click(object sender, RoutedEventArgs e)
{
if (!App.CurrentGame.loader.installed)
if (App.CurrentGame == GamesInstall.Unknown || !App.CurrentGame.loader.installed)
return;

ProfileDialog dialog = new();
Expand Down

0 comments on commit fff01c4

Please sign in to comment.