mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 15:41:49 +01:00
Fixed timeout disconnect
This commit is contained in:
parent
3137983b9c
commit
1c1a3f747c
@ -456,7 +456,7 @@ namespace DS4Windows
|
|||||||
hDevice.OpenFileStream(inputReport.Length);
|
hDevice.OpenFileStream(inputReport.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
sendOutputReport(true); // initialize the output report
|
sendOutputReport(true, true); // initialize the output report
|
||||||
}
|
}
|
||||||
|
|
||||||
private void timeoutTestThread()
|
private void timeoutTestThread()
|
||||||
@ -466,7 +466,7 @@ namespace DS4Windows
|
|||||||
if (timeoutEvent)
|
if (timeoutEvent)
|
||||||
{
|
{
|
||||||
timeoutExecuted = true;
|
timeoutExecuted = true;
|
||||||
this.sendOutputReport(true); // Kick Windows into noticing the disconnection.
|
this.sendOutputReport(true, true); // Kick Windows into noticing the disconnection.
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -791,7 +791,7 @@ namespace DS4Windows
|
|||||||
//Log.LogToGui(Mac.ToString() + " disconnected due to read failure: " + winError, true);
|
//Log.LogToGui(Mac.ToString() + " disconnected due to read failure: " + winError, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
sendOutputReport(true); // Kick Windows into noticing the disconnection.
|
sendOutputReport(true, true); // Kick Windows into noticing the disconnection.
|
||||||
StopOutputUpdate();
|
StopOutputUpdate();
|
||||||
isDisconnecting = true;
|
isDisconnecting = true;
|
||||||
uiContext.Send(new SendOrPostCallback(delegate (object state4)
|
uiContext.Send(new SendOrPostCallback(delegate (object state4)
|
||||||
@ -994,7 +994,7 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
synced = controllerSynced;
|
synced = controllerSynced;
|
||||||
SyncChange?.Invoke(this, EventArgs.Empty);
|
SyncChange?.Invoke(this, EventArgs.Empty);
|
||||||
sendOutputReport(true);
|
sendOutputReport(true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1101,7 +1101,7 @@ namespace DS4Windows
|
|||||||
hDevice.flush_Queue();
|
hDevice.flush_Queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
private unsafe void sendOutputReport(bool synchronous)
|
private unsafe void sendOutputReport(bool synchronous, bool force = false)
|
||||||
{
|
{
|
||||||
setTestRumble();
|
setTestRumble();
|
||||||
setHapticState();
|
setHapticState();
|
||||||
@ -1111,7 +1111,7 @@ namespace DS4Windows
|
|||||||
|
|
||||||
lock (outReportBuffer)
|
lock (outReportBuffer)
|
||||||
{
|
{
|
||||||
bool output = outputPendCount > 0, change = false;
|
bool output = outputPendCount > 0, change = force;
|
||||||
|
|
||||||
if (usingBT)
|
if (usingBT)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user