Fix assembly resolution in DiscoHawk on Mono

without this the program wouldn't open at all, I assume all of its actual
functions will just workTM now
This commit is contained in:
YoshiRulz 2020-12-29 01:33:57 +10:00
parent a0c7e9c7fb
commit 1a21765be6
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 6 additions and 1 deletions

View File

@ -24,7 +24,12 @@ namespace BizHawk.Client.DiscoHawk
{
static Program()
{
if (OSTC.IsUnixHost) return;
if (OSTC.IsUnixHost)
{
// for Unix, skip everything else and just wire up the event handler
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
return;
}
// http://www.codeproject.com/Articles/310675/AppDomain-AssemblyResolve-Event-Tips
// this will look in subdirectory "dll" to load pinvoked stuff