From 188a8565e0b1fabf73057b89871e8271c93bd075 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Thu, 13 Aug 2020 00:05:35 +0200 Subject: [PATCH] feat: add interface state to troubleshooting --- Dalamud/Dalamud.cs | 4 +++- Dalamud/Troubleshooting.cs | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dalamud/Dalamud.cs b/Dalamud/Dalamud.cs index f03538a76..b1fa7fc66 100644 --- a/Dalamud/Dalamud.cs +++ b/Dalamud/Dalamud.cs @@ -116,6 +116,7 @@ namespace Dalamud { PluginRepository = new PluginRepository(this, pluginDir, this.StartInfo.GameVersion); + var isInterfaceLoaded = false; if (!bool.Parse(Environment.GetEnvironmentVariable("DALAMUD_NOT_HAVE_INTERFACE") ?? "false")) { try { @@ -123,6 +124,7 @@ namespace Dalamud { InterfaceManager.OnDraw += BuildDalamudUi; InterfaceManager.Enable(); + isInterfaceLoaded = true; } catch (Exception e) { @@ -171,7 +173,7 @@ namespace Dalamud { IsReady = true; - Troubleshooting.LogTroubleshooting(this); + Troubleshooting.LogTroubleshooting(this, isInterfaceLoaded); }); } diff --git a/Dalamud/Troubleshooting.cs b/Dalamud/Troubleshooting.cs index 07fa08f50..803057095 100644 --- a/Dalamud/Troubleshooting.cs +++ b/Dalamud/Troubleshooting.cs @@ -16,9 +16,10 @@ namespace Dalamud public string Language { get; set; } public bool DoDalamudTest { get; set; } public bool DoPluginTest { get; set; } + public bool InterfaceLoaded { get; set; } } - public static void LogTroubleshooting(Dalamud dalamud) { + public static void LogTroubleshooting(Dalamud dalamud, bool isInterfaceLoaded) { try { var payload = new TroubleshootingPayload { LoadedPlugins = dalamud.PluginManager.Plugins.Select(x => x.Definition).ToArray(), @@ -26,7 +27,8 @@ namespace Dalamud GameVersion = dalamud.StartInfo.GameVersion, Language = dalamud.StartInfo.Language.ToString(), DoDalamudTest = dalamud.Configuration.DoDalamudTest, - DoPluginTest = dalamud.Configuration.DoPluginTest + DoPluginTest = dalamud.Configuration.DoPluginTest, + InterfaceLoaded = isInterfaceLoaded };