解决无法带命令启动模拟器

This commit is contained in:
cgl
2022-06-10 16:19:28 +08:00
parent aa25cb4cf6
commit bdf6f028f2

View File

@@ -218,12 +218,16 @@ namespace MeoAsstGui
public void TryToStartEmulator()
{
if (!StartEmulator
|| EmulatorPath.Length == 0
|| !File.Exists(EmulatorPath))
|| EmulatorPath.Length == 0)
{
return;
}
System.Diagnostics.Process.Start(EmulatorPath);
Process emuProcess = new Process();
emuProcess.StartInfo.FileName = "cmd.exe";
emuProcess.StartInfo.RedirectStandardInput = true;
emuProcess.StartInfo.UseShellExecute = false;
emuProcess.Start();
emuProcess.StandardInput.WriteLine(EmulatorPath);
int delay = 0;
if (!int.TryParse(EmulatorWaitSeconds, out delay))
{