diff --git a/SDL2-CS.csproj b/SDL2-CS.csproj index a4a92d4..2577901 100644 --- a/SDL2-CS.csproj +++ b/SDL2-CS.csproj @@ -1,6 +1,6 @@ - netstandard2.0 + net6.0 Library true SDL2# diff --git a/src/SDL2.cs b/src/SDL2.cs index b165b04..3dbc40f 100644 --- a/src/SDL2.cs +++ b/src/SDL2.cs @@ -37,6 +37,12 @@ namespace SDL2 { public static class SDL { + static SDL() + { + if (OperatingSystem.IsIOS()) + NativeLibrary.SetDllImportResolver(typeof(SDL).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL2.framework/SDL2", assembly, path)); + } + #region SDL2# Variables private const string nativeLibName = "SDL2";