mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-11 15:59:08 +01:00
Fix power state flags. Make sure to invoke a call on main thread
This commit is contained in:
parent
56517e4751
commit
858fe0a481
@ -539,25 +539,25 @@ namespace DS4Windows
|
||||
short evType = Convert.ToInt16(e.NewEvent.GetPropertyValue("EventType"));
|
||||
switch (evType)
|
||||
{
|
||||
case 4:
|
||||
case 7:
|
||||
{
|
||||
if (btnStartStop.Text == Properties.Resources.StartText && wasrunning)
|
||||
{
|
||||
DS4LightBar.shuttingdown = false;
|
||||
wasrunning = false;
|
||||
Program.rootHub.suspending = false;
|
||||
BtnStartStop_Clicked();
|
||||
this.Invoke((System.Action)(() => BtnStartStop_Clicked()));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
case 4:
|
||||
{
|
||||
if (btnStartStop.Text == Properties.Resources.StopText)
|
||||
{
|
||||
DS4LightBar.shuttingdown = true;
|
||||
Program.rootHub.suspending = true;
|
||||
BtnStartStop_Clicked();
|
||||
this.Invoke((System.Action)(() => BtnStartStop_Clicked()));
|
||||
wasrunning = true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user