mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
34 lines
777 B
C#
34 lines
777 B
C#
#if !WINDOWS
|
|
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using OpenTK.Audio.OpenAL;
|
|
using SDL3;
|
|
|
|
namespace Robust.Client.Utility
|
|
{
|
|
internal static class ClientDllMap
|
|
{
|
|
[ModuleInitializer]
|
|
internal static void Initialize()
|
|
{
|
|
NativeLibrary.SetDllImportResolver(typeof(ClientDllMap).Assembly, (name, assembly, path) =>
|
|
{
|
|
if (name == "libEGL.dll")
|
|
{
|
|
#if LINUX || FREEBSD
|
|
return NativeLibrary.Load("libEGL.so", assembly, path);
|
|
#endif
|
|
}
|
|
|
|
return IntPtr.Zero;
|
|
});
|
|
|
|
#if MACOS
|
|
OpenALLibraryNameContainer.OverridePath = "libopenal.1.dylib";
|
|
#endif
|
|
}
|
|
}
|
|
}
|
|
#endif
|