fix(server plugins): the server card binds ImGui.NET to the engine's cimgui (server plugins +0.0.1)

A second ImGui copy drew the card against the main context in a popped-out Mini Remote and crashed the client (SK on DreamWeave).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
BlankenshipG 2026-10-19 20:31:38 -04:00
commit ce99818e17
19 changed files with 60 additions and 32 deletions

View file

@ -85,6 +85,9 @@ public sealed partial class ServerPackPlugin : RynthPluginBase
public override int Initialize()
{
Host.Log($"[{RynthPluginInfo.Name}] Plugin initialized for {Info.Name} ({Info.Id}).");
// The server card draws through the engine's cimgui (and so in its current context, a
// popped-out Mini Remote's included), not a second copy of ImGui (ImGuiNativeBinding.cs).
RynthCore.Plugin.Shared.ImGuiNativeBinding.Ensure(msg => Host.Log($"[{RynthPluginInfo.Name}] {msg}"));
ServerInitialize();
return 0;
}

View file

@ -40,6 +40,8 @@
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)..\SafeImGui.cs" Link="Shared\SafeImGui.cs" />
<!-- ImGui.NET bound to the engine's cimgui (one ImGui, one current context; pop-outs included). -->
<Compile Include="$(MSBuildThisFileDirectory)..\ImGuiNativeBinding.cs" Link="Shared\ImGuiNativeBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ServerPackInfo.cs" Link="ServerPack\ServerPackInfo.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ServerPackModel.cs" Link="ServerPack\ServerPackModel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ServerPackUi.cs" Link="ServerPack\ServerPackUi.cs" />