mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-23 08:59:17 +01:00
fix: "pick and restart" option in branch switcher not saving in time
This commit is contained in:
parent
5c5f6be6ee
commit
63fe36920a
2 changed files with 12 additions and 1 deletions
|
|
@ -370,13 +370,21 @@ internal sealed class DalamudConfiguration : IServiceType
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save the configuration at the path it was loaded from.
|
/// Save the configuration at the path it was loaded from, at the next frame.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void QueueSave()
|
public void QueueSave()
|
||||||
{
|
{
|
||||||
this.isSaveQueued = true;
|
this.isSaveQueued = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Immediately save the configuration.
|
||||||
|
/// </summary>
|
||||||
|
public void ForceSave()
|
||||||
|
{
|
||||||
|
this.Save();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save the file, if needed. Only needs to be done once a frame.
|
/// Save the file, if needed. Only needs to be done once a frame.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,9 @@ public class BranchSwitcherWindow : Window
|
||||||
{
|
{
|
||||||
Pick();
|
Pick();
|
||||||
|
|
||||||
|
// If we exit immediately, we need to write out the new config now
|
||||||
|
Service<DalamudConfiguration>.Get().ForceSave();
|
||||||
|
|
||||||
var appData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
var appData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||||
var xlPath = Path.Combine(appData, "XIVLauncher", "XIVLauncher.exe");
|
var xlPath = Path.Combine(appData, "XIVLauncher", "XIVLauncher.exe");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue