Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
Change main window init to allow HidGuardian message to appear in Log…
Browse files Browse the repository at this point in the history
… tab
  • Loading branch information
Ryochan7 committed Jan 29, 2020
1 parent 60983de commit a6edab6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions DS4Windows/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,15 @@ private void Application_Startup(object sender, StartupEventArgs e)

SetUICulture(DS4Windows.Global.UseLang);
DS4Windows.Global.LoadLinkedProfiles();
rootHub.LaunchHidGuardHelper();
DS4Forms.MainWindow window = new DS4Forms.MainWindow(parser);
MainWindow = window;
window.Show();
window.CheckMinStatus();
HwndSource source = PresentationSource.FromVisual(window) as HwndSource;
CreateIPCClassNameMMF(source.Handle);

window.CheckMinStatus();
rootHub.LaunchHidGuardHelper();
window.LateChecks(parser);
}

private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
Expand Down
3 changes: 3 additions & 0 deletions DS4Windows/DS4Forms/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ public MainWindow(ArgumentParser parser)
timerThread.Priority = ThreadPriority.Lowest;
timerThread.Start();
timerThread.Join();
}

public void LateChecks(ArgumentParser parser)
{
Task.Run(() =>
{
CheckDrivers();
Expand Down

0 comments on commit a6edab6

Please sign in to comment.