From 64f51675c72f3340f43e14d1aaf262865af96d6c Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 8 Sep 2017 01:29:35 -0500 Subject: [PATCH] Changed ControlService thread --- DS4Windows/Program.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/DS4Windows/Program.cs b/DS4Windows/Program.cs index 0f81bea..fe03a68 100644 --- a/DS4Windows/Program.cs +++ b/DS4Windows/Program.cs @@ -23,6 +23,7 @@ namespace DS4Windows private static bool exitComThread = false; public static ControlService rootHub; private static Thread testThread; + private static Thread controlThread; /// /// The main entry point for the application. @@ -119,11 +120,11 @@ namespace DS4Windows private static void createControlService() { - Thread temp = new Thread(() => { rootHub = new ControlService(); }); - temp.Priority = ThreadPriority.Normal; - temp.IsBackground = true; - temp.Start(); - while (temp.IsAlive) + controlThread = new Thread(() => { rootHub = new ControlService(); }); + controlThread.Priority = ThreadPriority.Normal; + controlThread.IsBackground = true; + controlThread.Start(); + while (controlThread.IsAlive) Thread.SpinWait(500); }