Skip to content

Commit

Permalink
Change path priority
Browse files Browse the repository at this point in the history
  • Loading branch information
jgcodes2020 committed Oct 19, 2023
1 parent 7f6ae84 commit 9c759d4
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions M64RPFW.Views.Avalonia/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,20 @@ private static void SetupConsole()
private static void InitLibraries()
{
if (OperatingSystem.IsWindows())
return;
if (OperatingSystem.IsLinux())
{
if (File.Exists("/lib/libavcodec.so"))
ffmpeg.RootPath = "/lib";
else if (File.Exists("/usr/lib/libavcodec.so"))
ffmpeg.RootPath = "/usr/lib";
else if (File.Exists("/lib64/libavcodec.so"))
// we don't need to do anything because FFmpeg
// is bundled in
}
else if (OperatingSystem.IsLinux())
{
if (File.Exists("/lib64/libavcodec.so"))
ffmpeg.RootPath = "/lib64";
else if (File.Exists("/usr/lib64/libavcodec.so"))
ffmpeg.RootPath = "/usr/lib64";
return;
else if (File.Exists("/lib/libavcodec.so"))
ffmpeg.RootPath = "/lib";
else if (File.Exists("/usr/lib/libavcodec.so"))
ffmpeg.RootPath = "/usr/lib";
}
if (OperatingSystem.IsMacOS())
{
Expand Down

0 comments on commit 9c759d4

Please sign in to comment.