Fix /pal test-connection not working if using Simple renderer

rendering
Liza 2023-02-25 01:06:33 +01:00
parent e79e8de6dc
commit e1dc8cafd9
2 changed files with 6 additions and 0 deletions

View File

@ -23,6 +23,7 @@ namespace Pal.Client.Commands
private void Execute()
{
_configWindow.IsOpen = true;
var _ = new TickScheduler(() => _configWindow.TestConnection());
}
}

View File

@ -13,6 +13,7 @@ using Dalamud.Game.Command;
using Dalamud.Game.Gui;
using Pal.Client.Properties;
using ECommons;
using ECommons.DalamudServices;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Pal.Client.Commands;
@ -66,6 +67,10 @@ namespace Pal.Client
HelpMessage = Localization.Command_pal_HelpText
});
// Using TickScheduler requires ECommons to at least be partially initialized
// ECommonsMain.Dispose leaves this untouched.
Svc.Init(pluginInterface);
Task.Run(async () => await CreateDependencyContext());
}