wip bindings upgrade

This commit is contained in:
goaaats 2025-04-06 20:59:23 +02:00
parent bd7e56850a
commit 0690cce995
272 changed files with 139041 additions and 1541 deletions

View 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;
}
}