Skip to content

Commit f84e572

Browse files
authored
Merge pull request #2 from yoshiask/exp/disable_uac
Make WMVCORE.dll source more reliable
2 parents e3b6d13 + f026774 commit f84e572

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

ZuneModCore/Mods/VideoSyncMod.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,19 @@ public class VideoSyncMod : Mod
2828
// Make a backup of the file
2929
File.Copy(WMVCORE_PATH, Path.Combine(StorageDirectory, "WMVCORE.original.dll"), true);
3030

31-
// NOTE: This is quite dangerous to do blindly, so let's not
31+
// NOTE: This is quite dangerous to do blindly, so let's not do this
3232
// Kill processes that are using WMVCORE.dll
3333
//foreach (System.Diagnostics.Process proc in FileUtil.WhoIsLocking(WMVCORE_PATH))
3434
//{
3535
// proc.Kill();
3636
//}
3737

38+
// Get the working WMVCORE.dll
39+
string sourcePath = Path.Combine(
40+
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)!, "Resources\\WMVCORE.dll");
41+
3842
// Copy the pre-Anniversary Update WMVCORE.dll
39-
File.Copy("Resources\\WMVCORE.dll", WMVCORE_PATH, true);
43+
File.Copy(sourcePath, WMVCORE_PATH, true);
4044

4145
return Task.FromResult<string?>(null);
4246
}

0 commit comments

Comments
 (0)