feat: warn if boot plugin load takes longer than 2 minutes

This commit is contained in:
goat 2022-08-16 22:06:01 +02:00
parent f9ab1dbf26
commit bcc30e8731
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B

View file

@ -44,6 +44,8 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
private readonly List<int> openPluginCollapsibles = new();
private readonly DateTime timeLoaded;
#region Image Tester State
private string[] testerImagePaths = new string[5];
@ -128,6 +130,8 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
this.testerImagePaths[i] = string.Empty;
}
});
this.timeLoaded = DateTime.Now;
}
private enum OperationStatus
@ -326,6 +330,15 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
throw new ArgumentOutOfRangeException();
}
if (DateTime.Now - this.timeLoaded > TimeSpan.FromMinutes(2) && isWaitingManager)
{
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
ImGuiHelpers.CenteredText("This is embarrassing, but...");
ImGuiHelpers.CenteredText("one of your plugins may be blocking the installer.");
ImGuiHelpers.CenteredText("You should tell us about this.");
ImGui.PopStyleColor();
}
ImGui.EndChild();
}
}