From c864cae087b9f12434ca959d456433501dd1f719 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Sat, 21 Aug 2021 21:49:24 +0200 Subject: [PATCH] feat: set PluginSafeMode = true if needed --- Dalamud/EntryPoint.cs | 4 +++- .../Interface/Internal/Scratchpad/ScratchExecutionManager.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dalamud/EntryPoint.cs b/Dalamud/EntryPoint.cs index 78258c580..445d4bcac 100644 --- a/Dalamud/EntryPoint.cs +++ b/Dalamud/EntryPoint.cs @@ -212,7 +212,9 @@ namespace Dalamud if (result == (int)User32.MessageBoxResult.IDYES) { Log.Information("User chose to disable plugins on next launch..."); - // TODO When services are in + var config = Service.Get(); + config.PluginSafeMode = true; + config.Save(); } Environment.Exit(-1); diff --git a/Dalamud/Interface/Internal/Scratchpad/ScratchExecutionManager.cs b/Dalamud/Interface/Internal/Scratchpad/ScratchExecutionManager.cs index cb3133951..04aa17a48 100644 --- a/Dalamud/Interface/Internal/Scratchpad/ScratchExecutionManager.cs +++ b/Dalamud/Interface/Internal/Scratchpad/ScratchExecutionManager.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; -using Dalamud.IoC; + using Dalamud.IoC.Internal; using Dalamud.Plugin; using ImGuiNET;