mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 15:41:49 +01:00
Fixed bug with code executing with no user input
This should not be happening in the first place
This commit is contained in:
parent
84fdb26d18
commit
1ef0b04dbc
@ -825,8 +825,10 @@ namespace DS4Windows
|
||||
|
||||
public static SpecialAction GetAction(string name)
|
||||
{
|
||||
foreach (SpecialAction sA in m_Config.actions)
|
||||
//foreach (SpecialAction sA in m_Config.actions)
|
||||
for (int i=0, actionCount = m_Config.actions.Count; i < actionCount; i++)
|
||||
{
|
||||
SpecialAction sA = m_Config.actions[i];
|
||||
if (sA.name == name)
|
||||
return sA;
|
||||
}
|
||||
@ -848,8 +850,8 @@ namespace DS4Windows
|
||||
|
||||
foreach (string actionname in m_Config.profileActions[device])
|
||||
{
|
||||
m_Config.profileActionDict[device].Add(actionname, Global.GetAction(actionname));
|
||||
m_Config.profileActionIndexDict[device].Add(actionname, Global.GetActionIndexOf(actionname));
|
||||
m_Config.profileActionDict[device][actionname] = GetAction(actionname);
|
||||
m_Config.profileActionIndexDict[device][actionname] = GetActionIndexOf(actionname);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2680,7 +2680,9 @@ namespace DS4Windows
|
||||
|
||||
private void lVActions_ItemCheck(object sender, ItemCheckEventArgs e)
|
||||
{
|
||||
if (actionTabSeen)
|
||||
// Code can get executed even when control is not visible.
|
||||
// Should not be happening
|
||||
if (lVActions.Visible && actionTabSeen)
|
||||
{
|
||||
List<string> pactions = new List<string>();
|
||||
foreach (ListViewItem lvi in lVActions.Items)
|
||||
|
Loading…
Reference in New Issue
Block a user