1
0
forked from MeloNX/MeloNX

iOS - Set Silk.NET SearchPathContainer

This commit is contained in:
Isaac Marovitz 2024-01-01 15:43:17 -08:00 committed by Emmanuel Hansen
parent 6884a14b32
commit 31af1e194f
2 changed files with 7 additions and 2 deletions

View File

@ -32,7 +32,7 @@ namespace LibRyujinx
public static IRenderer? Renderer { get; set; } public static IRenderer? Renderer { get; set; }
public static GraphicsConfiguration GraphicsConfiguration { get; private set; } public static GraphicsConfiguration GraphicsConfiguration { get; private set; }
public static bool InitializeGraphics(GraphicsConfiguration graphicsConfiguration) public static bool InitializeGraphics(GraphicsConfiguration graphicsConfiguration)
{ {
GraphicsConfig.ResScale = graphicsConfiguration.ResScale; GraphicsConfig.ResScale = graphicsConfiguration.ResScale;
@ -200,7 +200,7 @@ namespace LibRyujinx
throw new ArgumentException($"Unknown Progress Handler type {typeof(T)}"); throw new ArgumentException($"Unknown Progress Handler type {typeof(T)}");
} }
} }
public static void SetSwapBuffersCallback(SwapBuffersCallback swapBuffersCallback) public static void SetSwapBuffersCallback(SwapBuffersCallback swapBuffersCallback)
{ {
_swapBuffersCallback = swapBuffersCallback; _swapBuffersCallback = swapBuffersCallback;

View File

@ -103,6 +103,11 @@ namespace LibRyujinx
[UnmanagedCallersOnly(EntryPoint = "graphics_initialize")] [UnmanagedCallersOnly(EntryPoint = "graphics_initialize")]
public static bool InitializeGraphicsNative(GraphicsConfiguration graphicsConfiguration) public static bool InitializeGraphicsNative(GraphicsConfiguration graphicsConfiguration)
{ {
if (OperatingSystem.IsIOS())
{
// Yes, macOS not iOS
Silk.NET.Core.Loader.SearchPathContainer.Platform = Silk.NET.Core.Loader.UnderlyingPlatform.MacOS;
}
return InitializeGraphics(graphicsConfiguration); return InitializeGraphics(graphicsConfiguration);
} }