mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-02-02 10:02:36 +01:00
Use BeginInvoke in timer method
This commit is contained in:
parent
b5b45a8983
commit
41ebb0d716
@ -535,22 +535,32 @@ namespace DS4Windows
|
|||||||
string slide = Program.rootHub.TouchpadSlide(i);
|
string slide = Program.rootHub.TouchpadSlide(i);
|
||||||
if (slide == "left")
|
if (slide == "left")
|
||||||
{
|
{
|
||||||
if (cbs[i].SelectedIndex <= 0)
|
this.BeginInvoke((System.Action)(() =>
|
||||||
cbs[i].SelectedIndex = cbs[i].Items.Count - 2;
|
{
|
||||||
else
|
if (cbs[i].SelectedIndex <= 0)
|
||||||
cbs[i].SelectedIndex--;
|
cbs[i].SelectedIndex = cbs[i].Items.Count - 2;
|
||||||
|
else
|
||||||
|
cbs[i].SelectedIndex--;
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
else if (slide == "right")
|
else if (slide == "right")
|
||||||
{
|
{
|
||||||
if (cbs[i].SelectedIndex == cbs[i].Items.Count - 2)
|
this.BeginInvoke((System.Action)(() =>
|
||||||
cbs[i].SelectedIndex = 0;
|
{
|
||||||
else
|
if (cbs[i].SelectedIndex == cbs[i].Items.Count - 2)
|
||||||
cbs[i].SelectedIndex++;
|
cbs[i].SelectedIndex = 0;
|
||||||
|
else
|
||||||
|
cbs[i].SelectedIndex++;
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (slide.Contains("t"))
|
if (slide.Contains("t"))
|
||||||
ShowNotification(this, Properties.Resources.UsingProfile.Replace("*number*", (i + 1).ToString()).Replace("*Profile name*", cbs[i].Text));
|
{
|
||||||
|
this.BeginInvoke((System.Action)(() =>
|
||||||
|
{
|
||||||
|
ShowNotification(this, Properties.Resources.UsingProfile.Replace("*number*", (i + 1).ToString()).Replace("*Profile name*", cbs[i].Text));
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user