Skip to content
This repository has been archived by the owner on Oct 24, 2021. It is now read-only.

fixed several "repeat while held" macro issues #198

Open
wants to merge 1 commit into
base: jay
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DS4Windows/DS4Control/ScpUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ public bool SaveProfile(int device, string propath)
keyType += DS4KeyType.Unbound;
if (dcs.keyType.HasFlag(DS4KeyType.HoldMacro))
keyType += DS4KeyType.HoldMacro;
if (dcs.keyType.HasFlag(DS4KeyType.Macro))
else if (dcs.keyType.HasFlag(DS4KeyType.Macro))
keyType += DS4KeyType.Macro;
if (dcs.keyType.HasFlag(DS4KeyType.Toggle))
keyType += DS4KeyType.Toggle;
Expand Down
2 changes: 1 addition & 1 deletion DS4Windows/DS4Forms/KBM360.cs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ private void rBShift_CheckedChanged(object sender, EventArgs e)
lBMacroOn.Visible = true;
foreach (int i in tag)
macrostag.Add(i);
if (Global.GetDS4KeyType(device, button.Name, rBShiftModifer.Checked).HasFlag(DS4KeyType.RepeatMacro))
if (Global.GetDS4KeyType(device, button.Name, rBShiftModifer.Checked).HasFlag(DS4KeyType.HoldMacro))
macrorepeat = true;
}
else if (tagO is string || tagO is X360Controls)
Expand Down
2 changes: 1 addition & 1 deletion DS4Windows/DS4Forms/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ public void ChangeButtonText(Control ctrl, bool shift, KeyValuePair<object, stri
if (SC) kt |= DS4KeyType.ScanCode;
if (TG) kt |= DS4KeyType.Toggle;
if (MC) kt |= DS4KeyType.Macro;
if (MR) kt |= DS4KeyType.RepeatMacro;
if (MR) kt |= DS4KeyType.HoldMacro;
UpdateDS4CSetting(device, ctrl.Name, shift, tag.Key, tag.Value, kt, sTrigger);
}

Expand Down
6 changes: 2 additions & 4 deletions DS4Windows/DS4Forms/RecordBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,7 @@ public void btnSave_Click(object sender, EventArgs e)
kbm.macrostag = macros;
kbm.macros = macronames;
kbm.lBMacroOn.Visible = true;
if (cBStyle.SelectedIndex == 1)
kbm.macrorepeat = true;
kbm.macrorepeat = cBStyle.SelectedIndex == 1;
saved = true;
if (sender != kbm)
kbm.Close();
Expand All @@ -796,8 +795,7 @@ public void btnSave_Click(object sender, EventArgs e)
sA.macros = macronames;
sA.lbMacroRecorded.Text = string.Join(", ", macronames);
//kbm.lBMacroOn.Visible = true;
if (cBStyle.SelectedIndex == 1)
sA.macrorepeat = true;
sA.macrorepeat = cBStyle.SelectedIndex == 1;
saved = true;
//if (sender != sA)
// sA.Close();
Expand Down