Use nicer error message for starting MAME in non-MAME build

This commit is contained in:
YoshiRulz 2022-07-16 16:25:51 +10:00
parent efbef0bbda
commit aa708992e9
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 8 additions and 1 deletions

View File

@ -88,7 +88,14 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME
{
public MAME(string dir, string file, MAME.MAMESyncSettings syncSettings, out string gamename)
{
OSTailoredCode.LinkedLibManager.FreeByPtr(OSTailoredCode.LinkedLibManager.LoadOrThrow(LibMAME.dll)); // don't bother if the library is missing
try
{
OSTailoredCode.LinkedLibManager.FreeByPtr(OSTailoredCode.LinkedLibManager.LoadOrThrow(LibMAME.dll));
}
catch (Exception e)
{
throw new Exception("failed to load MAME core library (is this actually a MAME build of BizHawk?)", e);
}
_gameDirectory = dir;
_gameFileName = file;