mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-29 20:44:20 +01:00
Add HidGuardian AffectedDevices link to settings
This commit is contained in:
parent
c72e490812
commit
3caf4fa514
@ -29,6 +29,13 @@ namespace DS4Windows
|
|||||||
bool[] held = new bool[DS4_CONTROLLER_COUNT];
|
bool[] held = new bool[DS4_CONTROLLER_COUNT];
|
||||||
int[] oldmouse = new int[DS4_CONTROLLER_COUNT] { -1, -1, -1, -1 };
|
int[] oldmouse = new int[DS4_CONTROLLER_COUNT] { -1, -1, -1, -1 };
|
||||||
Thread tempThread;
|
Thread tempThread;
|
||||||
|
public List<string> affectedDevs = new List<string>()
|
||||||
|
{
|
||||||
|
@"HID\VID_054C&PID_05C4",
|
||||||
|
@"HID\VID_054C&PID_09CC&MI_03",
|
||||||
|
@"HID\{00001124-0000-1000-8000-00805f9b34fb}_VID&0002054c_PID&05c4",
|
||||||
|
@"HID\{00001124-0000-1000-8000-00805f9b34fb}_VID&0002054c_PID&09cc",
|
||||||
|
};
|
||||||
//SoundPlayer sp = new SoundPlayer();
|
//SoundPlayer sp = new SoundPlayer();
|
||||||
|
|
||||||
private class X360Data
|
private class X360Data
|
||||||
@ -43,11 +50,6 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
//sp.Stream = Properties.Resources.EE;
|
//sp.Stream = Properties.Resources.EE;
|
||||||
// Cause thread affinity to not be tied to main GUI thread
|
// Cause thread affinity to not be tied to main GUI thread
|
||||||
/*Task x360task = new Task(() => { Thread.CurrentThread.Priority = ThreadPriority.AboveNormal; x360Bus = new X360Device(); });
|
|
||||||
x360task.Start();
|
|
||||||
while (!x360task.IsCompleted)
|
|
||||||
Thread.SpinWait(500);
|
|
||||||
*/
|
|
||||||
tempThread = new Thread(() => { x360Bus = new X360Device(); });
|
tempThread = new Thread(() => { x360Bus = new X360Device(); });
|
||||||
tempThread.Priority = ThreadPriority.AboveNormal;
|
tempThread.Priority = ThreadPriority.AboveNormal;
|
||||||
tempThread.IsBackground = true;
|
tempThread.IsBackground = true;
|
||||||
|
10
DS4Windows/DS4Forms/DS4Form.Designer.cs
generated
10
DS4Windows/DS4Forms/DS4Form.Designer.cs
generated
@ -163,6 +163,7 @@
|
|||||||
this.useProfileColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.useProfileColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.useCustomColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.useCustomColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.advColorDialog = new DS4Windows.AdvancedColorDialog();
|
this.advColorDialog = new DS4Windows.AdvancedColorDialog();
|
||||||
|
this.hidGuardWhiteList = new System.Windows.Forms.LinkLabel();
|
||||||
this.pnlButton.SuspendLayout();
|
this.pnlButton.SuspendLayout();
|
||||||
this.cMTaskbar.SuspendLayout();
|
this.cMTaskbar.SuspendLayout();
|
||||||
this.tabMain.SuspendLayout();
|
this.tabMain.SuspendLayout();
|
||||||
@ -1152,6 +1153,7 @@
|
|||||||
this.flowLayoutPanel1.Controls.Add(this.linkProfiles);
|
this.flowLayoutPanel1.Controls.Add(this.linkProfiles);
|
||||||
this.flowLayoutPanel1.Controls.Add(this.lnkControllers);
|
this.flowLayoutPanel1.Controls.Add(this.lnkControllers);
|
||||||
this.flowLayoutPanel1.Controls.Add(this.linkUninstall);
|
this.flowLayoutPanel1.Controls.Add(this.linkUninstall);
|
||||||
|
this.flowLayoutPanel1.Controls.Add(this.hidGuardWhiteList);
|
||||||
this.flowLayoutPanel1.Controls.Add(this.linkSetup);
|
this.flowLayoutPanel1.Controls.Add(this.linkSetup);
|
||||||
this.flowLayoutPanel1.Controls.Add(this.lLBUpdate);
|
this.flowLayoutPanel1.Controls.Add(this.lLBUpdate);
|
||||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||||
@ -1249,6 +1251,13 @@
|
|||||||
resources.ApplyResources(this.useCustomColorToolStripMenuItem, "useCustomColorToolStripMenuItem");
|
resources.ApplyResources(this.useCustomColorToolStripMenuItem, "useCustomColorToolStripMenuItem");
|
||||||
this.useCustomColorToolStripMenuItem.Click += new System.EventHandler(this.useCustomColorToolStripMenuItem_Click);
|
this.useCustomColorToolStripMenuItem.Click += new System.EventHandler(this.useCustomColorToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
// hidGuardWhiteList
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.hidGuardWhiteList, "hidGuardWhiteList");
|
||||||
|
this.hidGuardWhiteList.Name = "hidGuardWhiteList";
|
||||||
|
this.hidGuardWhiteList.TabStop = true;
|
||||||
|
this.hidGuardWhiteList.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.HidGuardWhiteList_LinkClicked);
|
||||||
|
//
|
||||||
// DS4Form
|
// DS4Form
|
||||||
//
|
//
|
||||||
this.AllowDrop = true;
|
this.AllowDrop = true;
|
||||||
@ -1441,6 +1450,7 @@
|
|||||||
private System.Windows.Forms.Button exportLogTxtBtn;
|
private System.Windows.Forms.Button exportLogTxtBtn;
|
||||||
private System.Windows.Forms.Button btnClear;
|
private System.Windows.Forms.Button btnClear;
|
||||||
private DS4Forms.LanguagePackComboBox languagePackComboBox1;
|
private DS4Forms.LanguagePackComboBox languagePackComboBox1;
|
||||||
|
private System.Windows.Forms.LinkLabel hidGuardWhiteList;
|
||||||
//private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
|
//private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -381,6 +381,7 @@ namespace DS4Windows
|
|||||||
uacPictureBox.Visible = true;
|
uacPictureBox.Visible = true;
|
||||||
new ToolTip().SetToolTip(uacPictureBox, Properties.Resources.UACTask);
|
new ToolTip().SetToolTip(uacPictureBox, Properties.Resources.UACTask);
|
||||||
runStartTaskRadio.Enabled = false;
|
runStartTaskRadio.Enabled = false;
|
||||||
|
hidGuardWhiteList.Visible = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1115,20 +1116,6 @@ namespace DS4Windows
|
|||||||
}
|
}
|
||||||
|
|
||||||
populateNotifyText();
|
populateNotifyText();
|
||||||
|
|
||||||
/*string tooltip = "DS4Windows v" + FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
|
|
||||||
for (int i = 0; i < ControlService.DS4_CONTROLLER_COUNT; i++)
|
|
||||||
{
|
|
||||||
string temp = Program.rootHub.getShortDS4ControllerInfo(i);
|
|
||||||
if (temp != Properties.Resources.NoneText)
|
|
||||||
tooltip += "\n" + (i + 1) + ": " + temp; // Carefully stay under the 63 character limit.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tooltip.Length > 63)
|
|
||||||
notifyIcon1.Text = tooltip.Substring(0, 63);
|
|
||||||
else
|
|
||||||
notifyIcon1.Text = tooltip;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void generateDeviceNotifyText(int index)
|
protected void generateDeviceNotifyText(int index)
|
||||||
@ -1289,17 +1276,10 @@ namespace DS4Windows
|
|||||||
|
|
||||||
generateDeviceNotifyText(Index);
|
generateDeviceNotifyText(Index);
|
||||||
populateNotifyText();
|
populateNotifyText();
|
||||||
//if (Program.rootHub.getShortDS4ControllerInfo(Index) != Properties.Resources.NoneText)
|
|
||||||
// tooltip += "\n" + (Index + 1) + ": " + Program.rootHub.getShortDS4ControllerInfo(Index); // Carefully stay under the 63 character limit.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lbNoControllers.Visible = nocontrollers;
|
lbNoControllers.Visible = nocontrollers;
|
||||||
tLPControllers.Visible = !nocontrollers;
|
tLPControllers.Visible = !nocontrollers;
|
||||||
/*if (tooltip.Length > 63)
|
|
||||||
notifyIcon1.Text = tooltip.Substring(0, 63);
|
|
||||||
else
|
|
||||||
notifyIcon1.Text = tooltip;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1365,7 +1345,6 @@ namespace DS4Windows
|
|||||||
LogDebug(e.Time, e.Data, e.Warning);
|
LogDebug(e.Time, e.Data, e.Warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void lBProfiles_MouseDoubleClick(object sender, MouseEventArgs e)
|
private void lBProfiles_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
if (lBProfiles.SelectedIndex >= 0)
|
if (lBProfiles.SelectedIndex >= 0)
|
||||||
@ -2510,6 +2489,17 @@ namespace DS4Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HidGuardWhiteList_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
RegistryKey key = Registry.LocalMachine.CreateSubKey(@"SYSTEM\CurrentControlSet\Services\HidGuardian\Parameters");
|
||||||
|
key.SetValue("AffectedDevices", Program.rootHub.affectedDevs.ToArray(), RegistryValueKind.MultiString);
|
||||||
|
Log.LogToGui("Wrote HidGuardian Device List to Registry", false);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
|
||||||
private void cBFlashWhenLate_CheckedChanged(object sender, EventArgs e)
|
private void cBFlashWhenLate_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FlashWhenLate = cBFlashWhenLate.Checked;
|
FlashWhenLate = cBFlashWhenLate.Checked;
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user