diff --git a/BizHawk.Common/InstanceDll.cs b/BizHawk.Common/InstanceDll.cs index 39007a0590..5f4ae2b744 100644 --- a/BizHawk.Common/InstanceDll.cs +++ b/BizHawk.Common/InstanceDll.cs @@ -21,9 +21,9 @@ namespace BizHawk.Common var envpath = Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process); try { - string envpath_new = Path.GetDirectoryName(dllPath) + ";" + envpath; + string envpath_new = Path.GetDirectoryName(path) + ";" + envpath; Environment.SetEnvironmentVariable("PATH", envpath_new, EnvironmentVariableTarget.Process); - _hModule = LoadLibrary(dllPath); //consider using LoadLibraryEx instead of shenanigans? + _hModule = LoadLibrary(path); //consider using LoadLibraryEx instead of shenanigans? var newfname = Path.GetFileName(path); newfname = "bizhawk.bizdelete-" + newfname; var newpath = Path.Combine(Path.GetDirectoryName(path), newfname);