Move LuaLibraries.GuiLibrary to inheritors, fix related NREs on Unix
This commit is contained in:
parent
1fd620a1f4
commit
7cce81a880
|
@ -92,7 +92,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
MainForm.FrameBufferResized();
|
||||
}
|
||||
|
||||
LuaImp.GuiLibrary.DrawFinish();
|
||||
LuaImp.GuiLibrary?.DrawFinish();
|
||||
LuaImp?.Close();
|
||||
GlobalWin.OSD.ClearGuiText();
|
||||
}
|
||||
|
@ -545,7 +545,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
}
|
||||
|
||||
if (LuaImp.GuiLibrary.SurfaceIsNull)
|
||||
if (LuaImp.GuiLibrary?.SurfaceIsNull == true)
|
||||
{
|
||||
LuaImp.GuiLibrary.DrawNew("emu");
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public readonly LuaDocumentation Docs = new LuaDocumentation();
|
||||
public abstract LuaFunctionList RegisteredFunctions { get; }
|
||||
public GuiLuaLibrary GuiLibrary => (GuiLuaLibrary) Libraries[typeof(GuiLuaLibrary)];
|
||||
public abstract GuiLuaLibrary GuiLibrary { get; }
|
||||
protected readonly Dictionary<Type, LuaLibraryBase> Libraries = new Dictionary<Type, LuaLibraryBase>();
|
||||
public IEnumerable<LuaFile> RunningScripts => ScriptList.Where(lf => lf.Enabled);
|
||||
public readonly LuaFileList ScriptList = new LuaFileList();
|
||||
|
|
|
@ -36,6 +36,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
private static readonly LuaFunctionList EmptyLuaFunList = new LuaFunctionList();
|
||||
public override LuaFunctionList RegisteredFunctions => EmptyLuaFunList;
|
||||
public override GuiLuaLibrary GuiLibrary => null;
|
||||
public override void Restart(IEmulatorServiceProvider newServiceProvider)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -110,6 +110,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private EmulationLuaLibrary EmulationLuaLibrary => (EmulationLuaLibrary)Libraries[typeof(EmulationLuaLibrary)];
|
||||
|
||||
public override GuiLuaLibrary GuiLibrary => (GuiLuaLibrary) Libraries[typeof(GuiLuaLibrary)];
|
||||
|
||||
public override void Restart(IEmulatorServiceProvider newServiceProvider)
|
||||
{
|
||||
foreach (var lib in Libraries)
|
||||
|
|
Loading…
Reference in New Issue