mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 19:14:20 +01:00
Minor tweak
This commit is contained in:
parent
9d6aa5413e
commit
044e1ddad8
@ -2,7 +2,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Process = System.Diagnostics.Process;
|
|
||||||
|
|
||||||
using System.Media;
|
using System.Media;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -82,7 +81,7 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Registry.LocalMachine.CreateSubKey(@"SYSTEM\CurrentControlSet\Services\HidGuardian\Parameters\Whitelist\" + Process.GetCurrentProcess().Id);
|
Registry.LocalMachine.CreateSubKey(@"SYSTEM\CurrentControlSet\Services\HidGuardian\Parameters\Whitelist\" + System.Diagnostics.Process.GetCurrentProcess().Id);
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
@ -91,7 +90,7 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Registry.LocalMachine.DeleteSubKey(@"SYSTEM\CurrentControlSet\Services\HidGuardian\Parameters\Whitelist\" + Process.GetCurrentProcess().Id);
|
Registry.LocalMachine.DeleteSubKey(@"SYSTEM\CurrentControlSet\Services\HidGuardian\Parameters\Whitelist\" + System.Diagnostics.Process.GetCurrentProcess().Id);
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
@ -396,7 +395,7 @@ namespace DS4Windows
|
|||||||
string programPath = LaunchProgram[ind];
|
string programPath = LaunchProgram[ind];
|
||||||
if (programPath != string.Empty)
|
if (programPath != string.Empty)
|
||||||
{
|
{
|
||||||
Process[] localAll = Process.GetProcesses();
|
System.Diagnostics.Process[] localAll = System.Diagnostics.Process.GetProcesses();
|
||||||
bool procFound = false;
|
bool procFound = false;
|
||||||
for (int procInd = 0, procsLen = localAll.Length; !procFound && procInd < procsLen; procInd++)
|
for (int procInd = 0, procsLen = localAll.Length; !procFound && procInd < procsLen; procInd++)
|
||||||
{
|
{
|
||||||
@ -417,7 +416,7 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
Task processTask = new Task(() =>
|
Task processTask = new Task(() =>
|
||||||
{
|
{
|
||||||
Process tempProcess = new Process();
|
System.Diagnostics.Process tempProcess = new System.Diagnostics.Process();
|
||||||
tempProcess.StartInfo.FileName = programPath;
|
tempProcess.StartInfo.FileName = programPath;
|
||||||
tempProcess.StartInfo.WorkingDirectory = new FileInfo(programPath).Directory.ToString();
|
tempProcess.StartInfo.WorkingDirectory = new FileInfo(programPath).Directory.ToString();
|
||||||
//tempProcess.StartInfo.UseShellExecute = false;
|
//tempProcess.StartInfo.UseShellExecute = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user