Skip to content

Commit

Permalink
Only perform SDL version check on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurumaker72 committed Oct 24, 2023
1 parent cae6c91 commit 0e412bd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions M64RPFW.Views.Avalonia/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,14 @@ private static void InitLibraries()
throw new PlatformNotSupportedException("Can't autodetect FFmpeg install!");
}

var sdlVersion = new Version();
Sdl.GetApi().GetVersion(ref sdlVersion);
if (sdlVersion.Major != 2 || sdlVersion.Minor < 22)
if (OperatingSystem.IsLinux())
{
throw new PlatformNotSupportedException("SDL 2.22 required, but not found");
var sdlVersion = new Version();
Sdl.GetApi().GetVersion(ref sdlVersion);
if (sdlVersion.Major != 2 || sdlVersion.Minor < 22)
{
throw new PlatformNotSupportedException("SDL 2.22 required, but not found");
}
}
}
}

0 comments on commit 0e412bd

Please sign in to comment.