mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 11:04:21 +01:00
Allow saving and editing loadProfile special action without unload trigger definition (ie. don't crash when editing specAction without unload trigger and allow saving an empty list of unload trigger keys for loadProfile action type).
This commit is contained in:
parent
1e82db0f9e
commit
88e3e0e3a2
@ -92,13 +92,16 @@ namespace DS4Windows
|
||||
case "Profile":
|
||||
cBActions.SelectedIndex = 3;
|
||||
cBProfiles.Text = act.details;
|
||||
foreach (string s in act.ucontrols.Split('/'))
|
||||
foreach (ListViewItem lvi in lVUnloadTrigger.Items)
|
||||
if (lvi.Text == s)
|
||||
{
|
||||
lvi.Checked = true;
|
||||
break;
|
||||
}
|
||||
if (act.ucontrols != null)
|
||||
{
|
||||
foreach (string s in act.ucontrols.Split('/'))
|
||||
foreach (ListViewItem lvi in lVUnloadTrigger.Items)
|
||||
if (lvi.Text == s)
|
||||
{
|
||||
lvi.Checked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "Key":
|
||||
cBActions.SelectedIndex = 4;
|
||||
@ -261,7 +264,7 @@ namespace DS4Windows
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (cBProfiles.SelectedIndex > 0 && ucontrols.Count > 0)
|
||||
if (cBProfiles.SelectedIndex > 0 /*&& ucontrols.Count > 0*/)
|
||||
{
|
||||
action = Properties.Resources.LoadProfile.Replace("*profile*", cBProfiles.Text);
|
||||
actRe = true;
|
||||
|
Loading…
Reference in New Issue
Block a user