From d73ac204882db582f0a99d5cc72887d26bcf0d98 Mon Sep 17 00:00:00 2001 From: Ac_K Date: Thu, 20 May 2021 00:39:41 +0200 Subject: [PATCH] Check if ffmpeg isn't found --- Ryujinx/Program.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Ryujinx/Program.cs b/Ryujinx/Program.cs index 2e160d798..4e080cf21 100644 --- a/Ryujinx/Program.cs +++ b/Ryujinx/Program.cs @@ -89,10 +89,19 @@ namespace Ryujinx RedirectStandardOutput = true }); - ffmpeg.RootPath = Path.GetDirectoryName(lddProcess.StandardOutput.ReadToEnd().Split(" => ")[1]); + string lddOutput = lddProcess.StandardOutput.ReadToEnd(); lddProcess.WaitForExit(); lddProcess.Close(); + + if (lddOutput.Contains(" => ")) + { + ffmpeg.RootPath = Path.GetDirectoryName(lddOutput.Split(" => ")[1]); + } + else + { + Logger.Error?.PrintMsg(LogClass.FFmpeg, "FFmpeg wasn't found. Make sure that you have it installed and up to date."); + } } string systemPath = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.Machine);