mirror of
https://github.com/Ryujinx/SDL2-CS.git
synced 2024-12-22 18:25:33 +00:00
Bump projects to .NET 6 and add DllImport
resolver for iOS
This commit is contained in:
parent
98a238fe07
commit
e07402105e
|
@ -1,6 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<AssemblyTitle>SDL2#</AssemblyTitle>
|
<AssemblyTitle>SDL2#</AssemblyTitle>
|
||||||
|
|
|
@ -37,6 +37,12 @@ namespace SDL2
|
||||||
{
|
{
|
||||||
public static class SDL
|
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
|
#region SDL2# Variables
|
||||||
|
|
||||||
private const string nativeLibName = "SDL2";
|
private const string nativeLibName = "SDL2";
|
||||||
|
|
Loading…
Reference in a new issue