Temporarily fix Stbi.
This commit is contained in:
parent
afd73d1622
commit
3e7de074c6
@ -12,9 +12,14 @@ namespace Quik.Stb
|
|||||||
|
|
||||||
private static readonly string[] LibraryNames = new string[]
|
private static readonly string[] LibraryNames = new string[]
|
||||||
{
|
{
|
||||||
"runtimes/libstbi.dll",
|
//FIXME: This is wrong on so many levels, but, i need to do this
|
||||||
"runtimes/libstbi.so",
|
// in order to get a change of this running.
|
||||||
"runtimes/libstbi.dylib",
|
"runtimes/win-x64/native/libstbi.dll",
|
||||||
|
"runtimes/win-x86/native/libstbi.dll",
|
||||||
|
"runtimes/linux-arm/native/libstbi.so",
|
||||||
|
"runtimes/linux-arm64/native/libstbi.so",
|
||||||
|
"runtimes/linux-x64/native/libstbi.so",
|
||||||
|
"runtimes/native/libstbi.dylib",
|
||||||
"libstbi.dll",
|
"libstbi.dll",
|
||||||
"libstbi.so",
|
"libstbi.so",
|
||||||
"libstbi.dylib",
|
"libstbi.dylib",
|
||||||
@ -27,21 +32,14 @@ namespace Quik.Stb
|
|||||||
quik_stbi_failed_assert_store(Marshal.GetFunctionPointerForDelegate<FailedAssertProc>(FailedAssert));
|
quik_stbi_failed_assert_store(Marshal.GetFunctionPointerForDelegate<FailedAssertProc>(FailedAssert));
|
||||||
}
|
}
|
||||||
|
|
||||||
private const DllImportSearchPath SearchPath =
|
|
||||||
DllImportSearchPath.ApplicationDirectory |
|
|
||||||
DllImportSearchPath.UserDirectories |
|
|
||||||
DllImportSearchPath.AssemblyDirectory |
|
|
||||||
DllImportSearchPath.UseDllDirectoryForDependencies;
|
|
||||||
|
|
||||||
private static IntPtr Resolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)
|
private static IntPtr Resolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)
|
||||||
{
|
{
|
||||||
Debugger.Break();
|
|
||||||
if (libraryName != "stbi")
|
if (libraryName != "stbi")
|
||||||
return IntPtr.Zero;
|
return IntPtr.Zero;
|
||||||
|
|
||||||
foreach (string name in LibraryNames)
|
foreach (string name in LibraryNames)
|
||||||
{
|
{
|
||||||
if (NativeLibrary.TryLoad(name, assembly, SearchPath, out IntPtr handle))
|
if (NativeLibrary.TryLoad(name, assembly, searchPath, out IntPtr handle))
|
||||||
{
|
{
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user