diff --git a/src/BUTR.CrashReport.Renderer.ImGui/CrashReportWindow.cs b/src/BUTR.CrashReport.Renderer.ImGui/CrashReportWindow.cs index 1ab4615..3f697e1 100644 --- a/src/BUTR.CrashReport.Renderer.ImGui/CrashReportWindow.cs +++ b/src/BUTR.CrashReport.Renderer.ImGui/CrashReportWindow.cs @@ -37,9 +37,6 @@ public static void ShowAndWait(Exception exception, IList logSources, IPathAnonymizer pathAnonymizer, ICrashReportRendererUtilities crashReportRendererUtilities) { - if (PathResolver.Default is DefaultPathResolver pr) - pr.Resolvers = [path => crashReportRendererUtilities.GetNativeLibrariesFolderPath().Select(x => Path.Combine(x, path))]; - var crashReport = CrashReportInfo.Create(exception, additionalMetadata, stacktraceFilter, assemblyUtilities, moduleProvider, loaderPluginProvider, harmonyProvider); var crashReportModel = CrashReportInfo.ToModel(crashReport, crashReportMetadataProvider, modelConverter, moduleProvider, loaderPluginProvider, assemblyUtilities, pathAnonymizer); @@ -47,8 +44,11 @@ public static void ShowAndWait(Exception exception, IList logSources, ShowAndWait(crashReportModel, logSources, crashReportRendererUtilities); } - private static void ShowAndWait(CrashReportModel crashReportModel, IList logSources, ICrashReportRendererUtilities crashReportRendererUtilities) + public static void ShowAndWait(CrashReportModel crashReportModel, IList logSources, ICrashReportRendererUtilities crashReportRendererUtilities) { + if (PathResolver.Default is DefaultPathResolver pr) + pr.Resolvers = [path => crashReportRendererUtilities.GetNativeLibrariesFolderPath().Select(x => Path.Combine(x, path))]; + var window = Window.Create(WindowOptions.Default with { Title = $"{crashReportModel.Metadata.GameName} Crash Report",