mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 06:13:40 +01:00
Merge branch 'net5' of github.com:goatcorp/Dalamud
This commit is contained in:
commit
f2c677bf97
7 changed files with 133 additions and 12 deletions
|
|
@ -14,7 +14,7 @@ namespace Dalamud.Game.ClientState.GamePad
|
|||
/// Will block game's gamepad input if <see cref="ImGuiConfigFlags.NavEnableGamepad"/> is set.
|
||||
/// </summary>
|
||||
[PluginInterface]
|
||||
[InterfaceVersion("1.0.0")]
|
||||
[InterfaceVersion("1.0")]
|
||||
[ServiceManager.BlockingEarlyLoadedService]
|
||||
public unsafe class GamepadState : IDisposable, IServiceType
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2631,9 +2631,9 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
|||
|
||||
public static string PluginContext_HidePlugin => Loc.Localize("InstallerHidePlugin", "Hide from installer");
|
||||
|
||||
public static string PluginContext_DeletePluginConfig => Loc.Localize("InstallerDeletePluginConfig", "Reset plugin");
|
||||
public static string PluginContext_DeletePluginConfig => Loc.Localize("InstallerDeletePluginConfig", "Reset plugin configuration");
|
||||
|
||||
public static string PluginContext_DeletePluginConfigReload => Loc.Localize("InstallerDeletePluginConfigReload", "Reset plugin settings & reload");
|
||||
public static string PluginContext_DeletePluginConfigReload => Loc.Localize("InstallerDeletePluginConfigReload", "Reset plugin configuration and reload");
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -1128,17 +1128,18 @@ internal partial class PluginManager : IDisposable, IServiceType
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unload the plugin, delete its configuration, and reload it.
|
||||
/// Delete the plugin configuration, unload/reload it if loaded.
|
||||
/// </summary>
|
||||
/// <param name="plugin">The plugin.</param>
|
||||
/// <exception cref="Exception">Throws if the plugin is still loading/unloading.</exception>
|
||||
/// <returns>The task.</returns>
|
||||
public async Task DeleteConfigurationAsync(LocalPlugin plugin)
|
||||
{
|
||||
if (plugin.State == PluginState.Loading || plugin.State == PluginState.Unloaded)
|
||||
if (plugin.State is PluginState.Loading or PluginState.Unloading)
|
||||
throw new Exception("Cannot delete configuration for a loading/unloading plugin");
|
||||
|
||||
if (plugin.IsLoaded)
|
||||
var isReloading = plugin.IsLoaded;
|
||||
if (isReloading)
|
||||
await plugin.UnloadAsync();
|
||||
|
||||
for (var waitUntil = Environment.TickCount64 + 1000; Environment.TickCount64 < waitUntil;)
|
||||
|
|
@ -1154,8 +1155,11 @@ internal partial class PluginManager : IDisposable, IServiceType
|
|||
}
|
||||
}
|
||||
|
||||
// Let's indicate "installer" here since this is supposed to be a fresh install
|
||||
await plugin.LoadAsync(PluginLoadReason.Installer);
|
||||
if (isReloading)
|
||||
{
|
||||
// Let's indicate "installer" here since this is supposed to be a fresh install
|
||||
await plugin.LoadAsync(PluginLoadReason.Installer);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue