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 4516af6 commit 510e6c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions gamevault/Helper/ProcessHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ internal static Process StartApp(string fileName, string parameter = "", bool as
}
app.FileName = fileName;
app.WorkingDirectory = Path.GetDirectoryName(fileName);
app.UseShellExecute = true;
app.Verb = "-PassThru";
app.UseShellExecute = true;
if (asAdmin)
{
app.Verb = "runas";
Expand Down
5 changes: 5 additions & 0 deletions gamevault/PipeServiceHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,11 @@ await Dispatch(() =>
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 510e6c8

Please sign in to comment.