Skip to content

Commit

Permalink
Fix Legendary's path when Heroic installed
Browse files Browse the repository at this point in the history
Apparently they made a trick and changed that in latest update.
  • Loading branch information
hawkeye116477 committed Aug 16, 2024
1 parent 31e2a74 commit 138f567
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/LegendaryLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,20 @@ public static string ClientExecPath
}
}

public static string HeroicLegendaryPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
@"Programs\heroic\resources\app.asar.unpacked\build\bin\win32\");
public static string HeroicLegendaryPath
{
get
{
var heroicResourcesBasePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
@"Programs\heroic\resources\app.asar.unpacked\build\bin");
var path = Path.Combine(heroicResourcesBasePath, @"win32\");
if (!Directory.Exists(path))
{
path = Path.Combine(heroicResourcesBasePath, @"x64\win32\");
}
return path;
}
}

public static string LauncherPath
{
Expand Down

0 comments on commit 138f567

Please sign in to comment.