mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
move bindings around
This commit is contained in:
parent
1bce618684
commit
b5a8bfe399
546 changed files with 8 additions and 8 deletions
37
imgui/Dalamud.Bindings.ImGui/ImGui.cs
Normal file
37
imgui/Dalamud.Bindings.ImGui/ImGui.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#nullable disable
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
namespace Dalamud.Bindings.ImGui
|
||||
{
|
||||
using HexaGen.Runtime;
|
||||
using System.Diagnostics;
|
||||
|
||||
public static class ImGuiConfig
|
||||
{
|
||||
public static bool AotStaticLink;
|
||||
}
|
||||
|
||||
public static unsafe partial class ImGui
|
||||
{
|
||||
static ImGui()
|
||||
{
|
||||
if (ImGuiConfig.AotStaticLink)
|
||||
{
|
||||
InitApi(new NativeLibraryContext(Process.GetCurrentProcess().MainModule!.BaseAddress));
|
||||
}
|
||||
else
|
||||
{
|
||||
//InitApi(new NativeLibraryContext(LibraryLoader.LoadLibrary(GetLibraryName, null)));
|
||||
InitApi(new NativeLibraryContext(Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location)!, GetLibraryName() + ".dll")));
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetLibraryName()
|
||||
{
|
||||
return "cimgui";
|
||||
}
|
||||
|
||||
public const nint ImDrawCallbackResetRenderState = -8;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue