From 1d913e1daab440b341d91e911fab2e9a45d99fb6 Mon Sep 17 00:00:00 2001 From: megai2 Date: Sat, 25 Sep 2021 20:40:21 +0300 Subject: [PATCH] keep dx9 path working --- .../GW2 Addon Manager/Backend/LoaderSetup/LoaderSetup.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/application/GW2 Addon Manager/Backend/LoaderSetup/LoaderSetup.cs b/application/GW2 Addon Manager/Backend/LoaderSetup/LoaderSetup.cs index e51d932..eaf5e71 100644 --- a/application/GW2 Addon Manager/Backend/LoaderSetup/LoaderSetup.cs +++ b/application/GW2 Addon Manager/Backend/LoaderSetup/LoaderSetup.cs @@ -17,6 +17,7 @@ class LoaderSetup UpdatingViewModel viewModel; string fileName; string latestLoaderVersion; + string loader_d3d9_destination; string loader_dxgi_destination; string loader_d3d11_destination; string loader_self_destination; @@ -43,12 +44,14 @@ public async Task HandleLoaderUpdate() loader_d3d11_destination = Path.Combine(loader_game_path, "d3d11.dll"); loader_dxgi_destination = Path.Combine(loader_game_path, "dxgi.dll"); loader_self_destination = Path.Combine(loader_game_path, "addonLoader.dll"); + loader_d3d9_destination = Path.Combine(loader_game_path, "bin64/d3d9.dll"); latestLoaderVersion = releaseInfo.tag_name; if (File.Exists(loader_d3d11_destination) && File.Exists(loader_dxgi_destination) && - File.Exists(loader_self_destination) && + File.Exists(loader_self_destination) && + File.Exists(loader_d3d9_destination) && _configurationManager.UserConfig.LoaderVersion == latestLoaderVersion) return; @@ -85,7 +88,11 @@ private void Install() if (File.Exists(loader_self_destination)) File.Delete(loader_self_destination); + if (File.Exists(loader_d3d9_destination)) + File.Delete(loader_d3d9_destination); + ZipFile.ExtractToDirectory(fileName, loader_game_path); + File.Copy(loader_self_destination, loader_d3d9_destination); _configurationManager.UserConfig.LoaderVersion = latestLoaderVersion; _configurationManager.SaveConfiguration();