From a6edab6e522b0bcbf318b453831158aac9eacfed Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 29 Jan 2020 16:27:38 -0600 Subject: [PATCH] Change main window init to allow HidGuardian message to appear in Log tab --- DS4Windows/App.xaml.cs | 6 ++++-- DS4Windows/DS4Forms/MainWindow.xaml.cs | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/DS4Windows/App.xaml.cs b/DS4Windows/App.xaml.cs index d8af55f..11f7300 100644 --- a/DS4Windows/App.xaml.cs +++ b/DS4Windows/App.xaml.cs @@ -160,13 +160,15 @@ namespace DS4WinWPF 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) diff --git a/DS4Windows/DS4Forms/MainWindow.xaml.cs b/DS4Windows/DS4Forms/MainWindow.xaml.cs index 5154b7a..646623a 100644 --- a/DS4Windows/DS4Forms/MainWindow.xaml.cs +++ b/DS4Windows/DS4Forms/MainWindow.xaml.cs @@ -120,7 +120,10 @@ namespace DS4WinWPF.DS4Forms timerThread.Priority = ThreadPriority.Lowest; timerThread.Start(); timerThread.Join(); + } + public void LateChecks(ArgumentParser parser) + { Task.Run(() => { CheckDrivers();