diff --git a/src/BizHawk.Emulation.Cores/Arcades/MAME/LibMAME.cs b/src/BizHawk.Emulation.Cores/Arcades/MAME/LibMAME.cs index 9cef767549..f60dc8f33f 100644 --- a/src/BizHawk.Emulation.Cores/Arcades/MAME/LibMAME.cs +++ b/src/BizHawk.Emulation.Cores/Arcades/MAME/LibMAME.cs @@ -5,7 +5,7 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME { public static class LibMAME { - private const string dll = "libmamearcade64.dll"; // libmamearcade64.dll libpacmansh64d.dll + internal const string dll = "libmamearcade64.dll"; // libmamearcade64.dll libpacmansh64d.dll private const CallingConvention cc = CallingConvention.Cdecl; public enum OutputChannel diff --git a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs index a0dc3ee631..60db8439ab 100644 --- a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs +++ b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs @@ -98,6 +98,8 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME { public MAME(string dir, string file, MAME.SyncSettings syncSettings, out string gamename) { + OSTailoredCode.LinkedLibManager.FreeByPtr(OSTailoredCode.LinkedLibManager.LoadOrThrow(LibMAME.dll)); // don't bother if the library is missing + ServiceProvider = new BasicServiceProvider(this); _gameDirectory = dir;