Skip to content

Commit

Permalink
Hopeful fix for steam game launch
Browse files Browse the repository at this point in the history
  • Loading branch information
Yelo420 committed Jan 15, 2025
1 parent 510e6c8 commit 0a242ec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gamevault/PipeServiceHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,17 +513,17 @@ private async Task StartGame(int id)
return;

// Ensure we're on the UI thread
await Dispatch(() =>
await Dispatch(async () =>
{
if (App.Instance.MainWindow != null)
{
App.Instance.MainWindow.Activate();
await Task.Delay(500);
}

var gameViewUserControl = new UserControls.GameViewUserControl(game, LoginManager.Instance.IsLoggedIn());
// Set the correct UI regardless of if it's visible to let the user manage it
MainWindowViewModel.Instance.SetActiveControl(gameViewUserControl);
if(App.Instance.MainWindow != null)
{
App.Instance.MainWindow.Topmost = true;
App.Instance.MainWindow.Topmost = false;
}
InstallUserControl.PlayGame(game.ID);
});
}
Expand Down

0 comments on commit 0a242ec

Please sign in to comment.