Check for MAME's lib before instantiating the MAME core (fixes #2538)

This commit is contained in:
YoshiRulz 2020-12-29 01:04:36 +10:00
parent f4e98fd9bd
commit c0cf40b68e
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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;