Browse Source

ConfigRuntime now properly shuts down and auto-saves all configs

4.0.0-beta
Anairkoen Schno 4 years ago
parent
commit
4f5472d561
2 changed files with 6 additions and 0 deletions
  1. +4
    -0
      IPA.Loader/Config/ConfigRuntime.cs
  2. +2
    -0
      IPA.Loader/Loader/PluginComponent.cs

+ 4
- 0
IPA.Loader/Config/ConfigRuntime.cs View File

@ -10,6 +10,8 @@ using IPA.Utilities.Async;
using System.IO;
using System.Runtime.CompilerServices;
using IPA.Logging;
using UnityEngine;
using Logger = IPA.Logging.Logger;
#if NET4
using Task = System.Threading.Tasks.Task;
using TaskEx = System.Threading.Tasks.Task;
@ -59,6 +61,8 @@ namespace IPA.Config
}
private static void ShutdownRuntime(object sender, EventArgs e)
=> ShutdownRuntime();
internal static void ShutdownRuntime()
{
watcherTrackConfigs.Clear();
var watchList = watchers.ToArray();


+ 2
- 0
IPA.Loader/Loader/PluginComponent.cs View File

@ -76,6 +76,8 @@ namespace IPA.Loader
bsPlugins.OnApplicationQuit();
ipaPlugins.OnApplicationQuit();
ConfigRuntime.ShutdownRuntime(); // this seems to be needed
quitting = true;
}


Loading…
Cancel
Save