mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 19:14:20 +01:00
Increased wakeup delay. Use custom flow on wakeup
This commit is contained in:
parent
aa0124970a
commit
0b6cb77108
@ -645,6 +645,7 @@ namespace DS4Windows.Forms
|
|||||||
short evType = Convert.ToInt16(e.NewEvent.GetPropertyValue("EventType"));
|
short evType = Convert.ToInt16(e.NewEvent.GetPropertyValue("EventType"));
|
||||||
switch (evType)
|
switch (evType)
|
||||||
{
|
{
|
||||||
|
// Wakeup from Suspend
|
||||||
case 7:
|
case 7:
|
||||||
{
|
{
|
||||||
if (btnStartStop.Text == Properties.Resources.StartText && wasrunning)
|
if (btnStartStop.Text == Properties.Resources.StartText && wasrunning)
|
||||||
@ -652,12 +653,27 @@ namespace DS4Windows.Forms
|
|||||||
DS4LightBar.shuttingdown = false;
|
DS4LightBar.shuttingdown = false;
|
||||||
wasrunning = false;
|
wasrunning = false;
|
||||||
Program.rootHub.suspending = false;
|
Program.rootHub.suspending = false;
|
||||||
Thread.Sleep(8000);
|
Thread.Sleep(16000);
|
||||||
this.Invoke((System.Action)(() => BtnStartStop_Clicked()));
|
//this.Invoke((System.Action)(() => BtnStartStop_Clicked()));
|
||||||
|
changingService = true;
|
||||||
|
SynchronizationContext uiContext = null;
|
||||||
|
Invoke((System.Action)(() => {
|
||||||
|
uiContext = SynchronizationContext.Current;
|
||||||
|
btnStartStop.Enabled = false;
|
||||||
|
}));
|
||||||
|
|
||||||
|
Program.rootHub.Start(uiContext);
|
||||||
|
|
||||||
|
Invoke((System.Action)(() => {
|
||||||
|
ServiceStartupFinish();
|
||||||
|
}));
|
||||||
|
|
||||||
|
changingService = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Entering Suspend
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
if (btnStartStop.Text == Properties.Resources.StopText)
|
if (btnStartStop.Text == Properties.Resources.StopText)
|
||||||
|
Loading…
Reference in New Issue
Block a user