Change main window init to allow HidGuardian message to appear in Log tab

This commit is contained in:
Travis Nickles 2020-01-29 16:27:38 -06:00
parent 60983de2c6
commit a6edab6e52
2 changed files with 7 additions and 2 deletions

View File

@ -160,13 +160,15 @@ namespace DS4WinWPF
SetUICulture(DS4Windows.Global.UseLang); SetUICulture(DS4Windows.Global.UseLang);
DS4Windows.Global.LoadLinkedProfiles(); DS4Windows.Global.LoadLinkedProfiles();
rootHub.LaunchHidGuardHelper();
DS4Forms.MainWindow window = new DS4Forms.MainWindow(parser); DS4Forms.MainWindow window = new DS4Forms.MainWindow(parser);
MainWindow = window; MainWindow = window;
window.Show(); window.Show();
window.CheckMinStatus();
HwndSource source = PresentationSource.FromVisual(window) as HwndSource; HwndSource source = PresentationSource.FromVisual(window) as HwndSource;
CreateIPCClassNameMMF(source.Handle); CreateIPCClassNameMMF(source.Handle);
window.CheckMinStatus();
rootHub.LaunchHidGuardHelper();
window.LateChecks(parser);
} }
private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)

View File

@ -120,7 +120,10 @@ namespace DS4WinWPF.DS4Forms
timerThread.Priority = ThreadPriority.Lowest; timerThread.Priority = ThreadPriority.Lowest;
timerThread.Start(); timerThread.Start();
timerThread.Join(); timerThread.Join();
}
public void LateChecks(ArgumentParser parser)
{
Task.Run(() => Task.Run(() =>
{ {
CheckDrivers(); CheckDrivers();