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,33 @@
using System.Reflection;
namespace Dalamud.Bindings.ImPlot
{
using HexaGen.Runtime;
using System.Diagnostics;
public static class ImPlotConfig
{
public static bool AotStaticLink;
}
public static unsafe partial class ImPlot
{
static ImPlot()
{
if (ImPlotConfig.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 "cimplot";
}
}
}