mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Load imgui.so if available for external tools running imgui on native (#2331)
This commit is contained in:
parent
cc741cec67
commit
0f8b65e95a
1 changed files with 10 additions and 2 deletions
|
|
@ -20,10 +20,18 @@ namespace Dalamud.Bindings.ImGui
|
||||||
{
|
{
|
||||||
InitApi(new NativeLibraryContext(Process.GetCurrentProcess().MainModule!.BaseAddress));
|
InitApi(new NativeLibraryContext(Process.GetCurrentProcess().MainModule!.BaseAddress));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var linuxPath = Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location)!, GetLibraryName() + ".so");
|
||||||
|
var windowsPath = Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location)!, GetLibraryName() + ".dll");
|
||||||
|
|
||||||
|
// This shouldn't affect wine as it'll be reported as Win32NT
|
||||||
|
if (System.Environment.OSVersion.Platform == PlatformID.Unix && File.Exists(linuxPath))
|
||||||
|
{
|
||||||
|
InitApi(new NativeLibraryContext(linuxPath));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//InitApi(new NativeLibraryContext(LibraryLoader.LoadLibrary(GetLibraryName, null)));
|
InitApi(new NativeLibraryContext(windowsPath));
|
||||||
InitApi(new NativeLibraryContext(Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location)!, GetLibraryName() + ".dll")));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue