public override void Play(Rom rom) { try { if (!_playing) { SetFullScreenMode(); string exe = Executable; var split = exe.Split(new string[] { "\\", "." }, StringSplitOptions.RemoveEmptyEntries); _processName = split[split.Length - 2]; string content = $"{exe} \"{rom.GetRomPath()}\""; System.IO.File.WriteAllText("n64.bat", content); Process p = new Process(); p.StartInfo.FileName = "n64.bat"; _playing = true; p.Start(); System.Threading.Thread.Sleep(2000); System.IO.File.Delete("n64.bat"); } } catch (Exception ex) { throw new Exception($"{nameof(Play)}: It was not possible to start N64 Rom: {ex.GetExceptionMessageRecursive()}"); } }
protected override string GetExutableArguments(Rom rom) { return($"\"{rom.GetRomPath()}\""); }