Changed thread affinity of UdpServer instance

This commit is contained in:
Travis Nickles 2018-07-23 00:10:00 -05:00
parent 5a4ed6c440
commit fc62708abf

View File

@ -123,7 +123,7 @@ namespace DS4Windows
{
//sp.Stream = Properties.Resources.EE;
// Cause thread affinity to not be tied to main GUI thread
tempThread = new Thread(() => { x360Bus = new X360Device(); });
tempThread = new Thread(() => { x360Bus = new X360Device(); _udpServer = new UdpServer(GetPadDetailForIdx); });
tempThread.Priority = ThreadPriority.AboveNormal;
tempThread.IsBackground = true;
tempThread.Start();
@ -141,8 +141,6 @@ namespace DS4Windows
PreviousState[i] = new DS4State();
ExposedState[i] = new DS4StateExposed(CurrentState[i]);
}
_udpServer = new UdpServer(GetPadDetailForIdx);
}
private void WarnExclusiveModeFailure(DS4Device device)