Skip to content

Commit

Permalink
keep dx9 path working
Browse files Browse the repository at this point in the history
  • Loading branch information
megai2 committed Sep 25, 2021
1 parent da04b8a commit 1d913e1
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 1d913e1

Please sign in to comment.