Minor tweak

This commit is contained in:
Travis Nickles 2018-07-10 01:18:27 -05:00
parent 1171a56a6b
commit f44cc21688
2 changed files with 5 additions and 6 deletions

View File

@ -433,7 +433,6 @@ namespace DS4Windows
audio = new DS4Audio(); audio = new DS4Audio();
micAudio = new DS4Audio(DS4Library.CoreAudio.DataFlow.Capture); micAudio = new DS4Audio(DS4Library.CoreAudio.DataFlow.Capture);
} }
else if (tempAttr.VendorId == 0x146B) else if (tempAttr.VendorId == 0x146B)
{ {
runCalib = false; runCalib = false;
@ -463,7 +462,7 @@ namespace DS4Windows
sixAxis = new DS4SixAxis(); sixAxis = new DS4SixAxis();
Crc32Algorithm.InitializeTable(DefaultPolynomial); Crc32Algorithm.InitializeTable(DefaultPolynomial);
if (runCalib) if (runCalib)
refreshCalibration(); RefreshCalibration();
if (!hDevice.IsFileStreamOpen()) if (!hDevice.IsFileStreamOpen())
{ {
@ -473,7 +472,7 @@ namespace DS4Windows
sendOutputReport(true, true); // initialize the output report sendOutputReport(true, true); // initialize the output report
} }
private void timeoutTestThread() private void TimeoutTestThread()
{ {
while (!timeoutExecuted) while (!timeoutExecuted)
{ {
@ -492,7 +491,7 @@ namespace DS4Windows
const int DS4_FEATURE_REPORT_5_LEN = 41; const int DS4_FEATURE_REPORT_5_LEN = 41;
const int DS4_FEATURE_REPORT_5_CRC32_POS = DS4_FEATURE_REPORT_5_LEN - 4; const int DS4_FEATURE_REPORT_5_CRC32_POS = DS4_FEATURE_REPORT_5_LEN - 4;
public void refreshCalibration() public void RefreshCalibration()
{ {
byte[] calibration = new byte[41]; byte[] calibration = new byte[41];
calibration[0] = conType == ConnectionType.BT ? (byte)0x05 : (byte)0x02; calibration[0] = conType == ConnectionType.BT ? (byte)0x05 : (byte)0x02;
@ -543,7 +542,7 @@ namespace DS4Windows
ds4Output.IsBackground = true; ds4Output.IsBackground = true;
ds4Output.Start(); ds4Output.Start();
timeoutCheckThread = new Thread(timeoutTestThread); timeoutCheckThread = new Thread(TimeoutTestThread);
timeoutCheckThread.Priority = ThreadPriority.BelowNormal; timeoutCheckThread.Priority = ThreadPriority.BelowNormal;
timeoutCheckThread.Name = "DS4 Timeout thread: " + Mac; timeoutCheckThread.Name = "DS4 Timeout thread: " + Mac;
timeoutCheckThread.IsBackground = true; timeoutCheckThread.IsBackground = true;

View File

@ -235,7 +235,7 @@ namespace DS4Windows
} }
if (device.ShouldRunCalib()) if (device.ShouldRunCalib())
device.refreshCalibration(); device.RefreshCalibration();
} }
} }
} }