Fix Win32LuaLibraries init'ing incorrectly on `DeveloperBuild = false`

This commit is contained in:
YoshiRulz 2022-12-07 14:27:19 +10:00
parent b04260bee7
commit 62f6f3b471
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,8 @@ namespace BizHawk.Client.EmuHawk
foreach (var lib in Client.Common.ReflectionCache.Types.Concat(EmuHawk.ReflectionCache.Types)
.Where(t => typeof(LuaLibraryBase).IsAssignableFrom(t) && t.IsSealed && ServiceInjector.IsAvailable(serviceProvider, t)))
{
if (VersionInfo.DeveloperBuild || lib.GetCustomAttribute<LuaLibraryAttribute>(inherit: false)?.Released == true)
if (VersionInfo.DeveloperBuild
|| lib.GetCustomAttribute<LuaLibraryAttribute>(inherit: false)?.Released is not false)
{
var instance = (LuaLibraryBase)Activator.CreateInstance(lib, this, _apiContainer, (Action<string>)LogToLuaConsole);
ServiceInjector.UpdateServices(serviceProvider, instance);