1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-05 01:32:00 +00:00

Check if ffmpeg isn't found

This commit is contained in:
Ac_K 2021-05-20 00:39:41 +02:00
parent 41e2ead0f0
commit d73ac20488

View file

@ -89,10 +89,19 @@ namespace Ryujinx
RedirectStandardOutput = true RedirectStandardOutput = true
}); });
ffmpeg.RootPath = Path.GetDirectoryName(lddProcess.StandardOutput.ReadToEnd().Split(" => ")[1]); string lddOutput = lddProcess.StandardOutput.ReadToEnd();
lddProcess.WaitForExit(); lddProcess.WaitForExit();
lddProcess.Close(); 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); string systemPath = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.Machine);