From 7f1a7485a7f4cf35544baf0f8f67343d908531ef Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 22 Mar 2017 02:41:04 -0700 Subject: [PATCH] Rename static property --- DS4Windows/DS4Library/DS4Device.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index 7bd957e..cf8707b 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -113,6 +113,8 @@ namespace DS4Windows { private const int BT_OUTPUT_REPORT_LENGTH = 78; private const int BT_INPUT_REPORT_LENGTH = 547; + // Use large value for worst case scenario + private static int READ_STREAM_TIMEOUT = 100; private HidDevice hDevice; private string Mac; private DS4State cState = new DS4State(); @@ -135,8 +137,6 @@ namespace DS4Windows public DateTime lastActive = DateTime.UtcNow; public DateTime firstActive = DateTime.UtcNow; private bool charging; - // Use large value for worst case scenario - private static int readStreamTimeout = 100; public event EventHandler Report = null; public event EventHandler Removal = null; @@ -388,7 +388,7 @@ namespace DS4Windows if (conType != ConnectionType.USB) { //HidDevice.ReadStatus res = hDevice.ReadFile(btInputReport); - HidDevice.ReadStatus res = hDevice.ReadAsyncWithFileStream(btInputReport, readStreamTimeout); + HidDevice.ReadStatus res = hDevice.ReadAsyncWithFileStream(btInputReport, READ_STREAM_TIMEOUT); readTimeout.Enabled = false; if (res == HidDevice.ReadStatus.Success) { @@ -409,7 +409,7 @@ namespace DS4Windows else { //HidDevice.ReadStatus res = hDevice.ReadFile(inputReport); - HidDevice.ReadStatus res = hDevice.ReadAsyncWithFileStream(inputReport2, readStreamTimeout); + HidDevice.ReadStatus res = hDevice.ReadAsyncWithFileStream(inputReport2, READ_STREAM_TIMEOUT); readTimeout.Enabled = false; if (res != HidDevice.ReadStatus.Success) {