replace nonfunctional managed asserts with proper imgui-handled assert mechanism

This commit is contained in:
goat 2024-12-25 12:46:54 +01:00
parent 8773d3b873
commit 12bf2f4478
12 changed files with 238 additions and 207 deletions

View file

@ -243,7 +243,7 @@ internal sealed class DalamudConfiguration : IInternalDisposableService
/// <summary>
/// Gets or sets a value indicating whether or not ImGui asserts should be enabled at startup.
/// </summary>
public bool AssertsEnabledAtStartup { get; set; }
public bool? ImGuiAssertsEnabledAtStartup { get; set; }
/// <summary>
/// Gets or sets a value indicating whether or not docking should be globally enabled in ImGui.
@ -605,6 +605,12 @@ internal sealed class DalamudConfiguration : IInternalDisposableService
this.AutoUpdateBehavior ??= this.AutoUpdatePlugins
? Plugin.Internal.AutoUpdate.AutoUpdateBehavior.UpdateAll
: Plugin.Internal.AutoUpdate.AutoUpdateBehavior.OnlyNotify;
// Turn ImGui asserts on by default if we have any active dev plugins
if (!this.ImGuiAssertsEnabledAtStartup.HasValue && this.DevPluginLoadLocations.Any(x => x.IsEnabled))
{
this.ImGuiAssertsEnabledAtStartup = true;
}
#pragma warning restore CS0618
}