From 10db075ece95d6fc3d78133c4949e961a6103eef Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Mon, 11 Sep 2023 12:03:52 +0200 Subject: [PATCH] Custom command arguments https://github.com/seerge/g-helper/issues/1292 --- app/HardwareControl.cs | 1 + app/Input/InputDispatcher.cs | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/HardwareControl.cs b/app/HardwareControl.cs index 16bed4ed..cf8d0d86 100644 --- a/app/HardwareControl.cs +++ b/app/HardwareControl.cs @@ -267,6 +267,7 @@ public static class HardwareControl if (_gpuControl.IsValid) { GpuControl = _gpuControl; + if (GpuControl.FullName.Contains("6850M")) AppConfig.Set("xgm_special", 1); Logger.WriteLine(GpuControl.FullName); return; } diff --git a/app/Input/InputDispatcher.cs b/app/Input/InputDispatcher.cs index 05df04ca..b7978b34 100644 --- a/app/Input/InputDispatcher.cs +++ b/app/Input/InputDispatcher.cs @@ -675,11 +675,14 @@ namespace GHelper.Input //string executable = command.Split(' ')[0]; //string arguments = command.Substring(executable.Length).Trim(); + ProcessStartInfo startInfo = new ProcessStartInfo("cmd", "/C " + command); + + startInfo.RedirectStandardOutput = true; + startInfo.RedirectStandardError = true; + startInfo.UseShellExecute = false; + startInfo.CreateNoWindow = true; - ProcessStartInfo startInfo = new ProcessStartInfo(); - startInfo.UseShellExecute = true; startInfo.WorkingDirectory = Environment.CurrentDirectory; - startInfo.FileName = command; //startInfo.Arguments = arguments; Process proc = Process.Start(startInfo); }