Watch
2
0
Fork
You've already forked raylib-cs
0

fix: centralized version data in Directory.build.props, and fixed various interop details that had incorrect function signatures

This commit is contained in:
tiger tiger tiger 2026-06-30 17:12:15 +02:00
commit 3b305013a1
11 changed files with 169 additions and 105 deletions

View file

@ -26,7 +26,14 @@ public static unsafe partial class Raylib
static Raylib()
{
NativeLibrary.SetDllImportResolver(Assembly.GetExecutingAssembly(), ResolveDllImport);
// On WebAssembly (browser) the native library is statically linked into the main
// module, and P/Invokes are resolved by the runtime's built-in static-linking table.
// A custom resolver would override that and fail (there is no library to load), so we
// only install it on platforms where raylib is a separate dynamic library.
if (!OperatingSystem.IsBrowser())
{
NativeLibrary.SetDllImportResolver(Assembly.GetExecutingAssembly(), ResolveDllImport);
}
}
public static IntPtr ResolveDllImport(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)