mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 23:51:49 +01:00
Make sure controller reading can be started when switching auto profiles
Related to issue #325.
This commit is contained in:
parent
600818a3c0
commit
e0d7f1ed14
@ -449,7 +449,8 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
if (Index < ControlService.DS4_CONTROLLER_COUNT)
|
if (Index < ControlService.DS4_CONTROLLER_COUNT)
|
||||||
{
|
{
|
||||||
statPB[Index].Visible = false; toolTip1.SetToolTip(statPB[Index], "");
|
statPB[Index].Visible = false;
|
||||||
|
toolTip1.SetToolTip(statPB[Index], "");
|
||||||
Batteries[Index].Text = Properties.Resources.NA;
|
Batteries[Index].Text = Properties.Resources.NA;
|
||||||
Pads[Index].Text = Properties.Resources.Disconnected;
|
Pads[Index].Text = Properties.Resources.Disconnected;
|
||||||
Enable_Controls(Index, false);
|
Enable_Controls(Index, false);
|
||||||
@ -594,10 +595,24 @@ namespace DS4Windows
|
|||||||
turnOffTemp = true;
|
turnOffTemp = true;
|
||||||
if (btnStartStop.Text == Properties.Resources.StopText)
|
if (btnStartStop.Text == Properties.Resources.StopText)
|
||||||
{
|
{
|
||||||
BtnStartStop_Clicked();
|
autoProfilesTimer.Stop();
|
||||||
hotkeysTimer.Start();
|
hotkeysTimer.Stop();
|
||||||
autoProfilesTimer.Start();
|
|
||||||
btnStartStop.Text = Properties.Resources.StartText;
|
this.Invoke((System.Action)(() => {
|
||||||
|
this.changingService = true;
|
||||||
|
BtnStartStop_Clicked();
|
||||||
|
}));
|
||||||
|
|
||||||
|
while (this.changingService)
|
||||||
|
{
|
||||||
|
Thread.SpinWait(500);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Invoke((System.Action)(() =>
|
||||||
|
{
|
||||||
|
hotkeysTimer.Start();
|
||||||
|
autoProfilesTimer.Start();
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -620,8 +635,10 @@ namespace DS4Windows
|
|||||||
turnOffTemp = false;
|
turnOffTemp = false;
|
||||||
if (btnStartStop.Text == Properties.Resources.StartText)
|
if (btnStartStop.Text == Properties.Resources.StartText)
|
||||||
{
|
{
|
||||||
BtnStartStop_Clicked();
|
this.BeginInvoke((System.Action)(() =>
|
||||||
btnStartStop.Text = Properties.Resources.StopText;
|
{
|
||||||
|
BtnStartStop_Clicked();
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user