mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-21 15:27:43 +01:00
feat: enable early loaded services to wait for provided services, some rewrites to make service kind declaration more explicit
This commit is contained in:
parent
0690f5dd2a
commit
2bdb837577
4 changed files with 37 additions and 26 deletions
|
|
@ -74,14 +74,17 @@ internal sealed class Dalamud : IServiceType
|
|||
if (!configuration.IsResumeGameAfterPluginLoad)
|
||||
{
|
||||
NativeFunctions.SetEvent(mainThreadContinueEvent);
|
||||
try
|
||||
{
|
||||
_ = ServiceManager.InitializeEarlyLoadableServices();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e, "Service initialization failure");
|
||||
}
|
||||
ServiceManager.InitializeEarlyLoadableServices()
|
||||
.ContinueWith(t =>
|
||||
{
|
||||
if (t.IsCompletedSuccessfully)
|
||||
return;
|
||||
|
||||
Log.Error(t.Exception!, "Service initialization failure");
|
||||
Util.Fatal(
|
||||
"Dalamud failed to load all necessary services.\n\nThe game will continue, but you may not be able to use plugins.",
|
||||
"Dalamud", false);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue