Skip to content

Commit 08b4757

Browse files
committed
Fix #794
1 parent 9912fbc commit 08b4757

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

toolsrc/MetahookInstaller/MetahookInstallerAvalonia/ViewModels/MainViewModel.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@ private void InstallMod(string basePath)
271271
var sourceMetaHookPath = Path.Combine(basePath, "MetaHook.exe");
272272
var targetMetaHookPath = Path.Combine(gamePath, "MetaHook.exe");
273273
bool isNonBlobEngine = IsLegitimatePE(hwDllPath);
274+
// 如果hw.dll是合法PE但Build目录中没有MetaHook.exe,回退到MetaHook_blob.exe
275+
if (isNonBlobEngine && !File.Exists(sourceMetaHookPath))
276+
{
277+
isNonBlobEngine = false;
278+
}
274279
if (isNonBlobEngine)
275280
{
276281
if (modName.Equals("svencoop", StringComparison.OrdinalIgnoreCase))

0 commit comments

Comments
 (0)