move bindings around

This commit is contained in:
goaaats 2025-04-06 21:08:34 +02:00
parent 1bce618684
commit b5a8bfe399
546 changed files with 8 additions and 8 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";
}
}
}