mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix convert game path
This commit is contained in:
@@ -43,8 +43,7 @@ internal sealed class LaunchExecutionEnsureGameResourceHandler : ILaunchExecutio
|
||||
}
|
||||
|
||||
await context.TaskContext.SwitchToMainThreadAsync();
|
||||
ImmutableList<GamePathEntry> gamePathEntries = context.Options.GetGamePathEntries(out GamePathEntry? selected);
|
||||
context.ViewModel.SetGamePathEntriesAndSelectedGamePathEntry(gamePathEntries, selected);
|
||||
context.UpdateGamePathEntry();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Model.Entity;
|
||||
using Snap.Hutao.Service.Game.PathAbstraction;
|
||||
using Snap.Hutao.Service.Game.Scheme;
|
||||
using Snap.Hutao.ViewModel.Game;
|
||||
using System.Collections.Immutable;
|
||||
|
||||
namespace Snap.Hutao.Service.Game.Launching;
|
||||
|
||||
@@ -68,4 +70,13 @@ internal sealed partial class LaunchExecutionContext
|
||||
this.gameFileSystem = gameFileSystem;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void UpdateGamePathEntry()
|
||||
{
|
||||
ImmutableList<GamePathEntry> gamePathEntries = Options.GetGamePathEntries(out GamePathEntry? selectedEntry);
|
||||
ViewModel.SetGamePathEntriesAndSelectedGamePathEntry(gamePathEntries, selectedEntry);
|
||||
|
||||
// invalidate game file system
|
||||
gameFileSystem = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user