From e25ee191024fd63dc85d3c1d670be547a8d58505 Mon Sep 17 00:00:00 2001 From: Soreepeong Date: Mon, 18 Dec 2023 04:51:21 +0900 Subject: [PATCH] fix --- .../Internal/ImGuiClipboardFunctionProvider.cs | 2 +- Dalamud/Interface/Utility/ImVectorWrapper.cs | 4 ++-- Dalamud/Plugin/Internal/Types/LocalPlugin.cs | 13 +++++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Dalamud/Interface/Internal/ImGuiClipboardFunctionProvider.cs b/Dalamud/Interface/Internal/ImGuiClipboardFunctionProvider.cs index a72a443240..a7ab552b87 100644 --- a/Dalamud/Interface/Internal/ImGuiClipboardFunctionProvider.cs +++ b/Dalamud/Interface/Internal/ImGuiClipboardFunctionProvider.cs @@ -63,7 +63,7 @@ private ImGuiClipboardFunctionProvider(InterfaceManager.InterfaceManagerWithScen io.SetClipboardTextFn = (nint)(delegate* unmanaged)&StaticSetClipboardTextImpl; io.GetClipboardTextFn = (nint)(delegate* unmanaged)&StaticGetClipboardTextImpl; - this.clipboardData = new(0, 0); + this.clipboardData = new(0, null); return; [UnmanagedCallersOnly] diff --git a/Dalamud/Interface/Utility/ImVectorWrapper.cs b/Dalamud/Interface/Utility/ImVectorWrapper.cs index de54289176..546e9e0ab3 100644 --- a/Dalamud/Interface/Utility/ImVectorWrapper.cs +++ b/Dalamud/Interface/Utility/ImVectorWrapper.cs @@ -251,7 +251,7 @@ public ImVectorWrapper(ref ImVector vector, delegate* destroyer = null /// /// The initial capacity. /// The destroyer function to call on item removal. - public ImVectorWrapper(int initialCapacity = 0, delegate* destroyer = null) + public ImVectorWrapper(int initialCapacity, delegate* destroyer = null) { if (initialCapacity < 0) { @@ -292,7 +292,7 @@ public ImVectorWrapper(int initialCapacity = 0, delegate* destroyer = /// The destoryer function. public ImVectorWrapper( int capacity, - int initialLength = 0, + int initialLength, T* backingStorage = null, ImVector* vectorStorage = null, delegate* destroyer = null) diff --git a/Dalamud/Plugin/Internal/Types/LocalPlugin.cs b/Dalamud/Plugin/Internal/Types/LocalPlugin.cs index 91f1625a7a..294a8dbfdc 100644 --- a/Dalamud/Plugin/Internal/Types/LocalPlugin.cs +++ b/Dalamud/Plugin/Internal/Types/LocalPlugin.cs @@ -626,6 +626,19 @@ private static void SetupLoaderConfig(LoaderConfig config) config.PreferSharedTypes = false; config.SharedAssemblies.Add(typeof(Lumina.GameData).Assembly.GetName()); config.SharedAssemblies.Add(typeof(Lumina.Excel.ExcelSheetImpl).Assembly.GetName()); + + AppDomain.CurrentDomain.AssemblyResolve += (_, args) => + { + try + { + return Assembly.Load(args.Name); + } + catch (Exception e) + { + Log.Error(e, "AssemblyResolve fail"); + return null; + } + }; } private void EnsureLoader()