Adjust timeout to lower values. The typical mouse response time is between 1 and 40ms. 300 should be more than enough to fail earlier when the device does not respond.

This commit is contained in:
IceStormNG
2023-07-30 10:47:35 +02:00
parent b0733d9254
commit e0795dd16b

View File

@@ -211,9 +211,14 @@ namespace GHelper.Peripherals.Mouse
} }
} }
public virtual int USBTimeout()
{
return 300;
}
public override void SetProvider() public override void SetProvider()
{ {
_usbProvider = new WindowsUsbProvider(_vendorId, _productId, path); _usbProvider = new WindowsUsbProvider(_vendorId, _productId, path, USBTimeout());
} }
protected virtual void OnDisconnect() protected virtual void OnDisconnect()