Add prop EngineName to abstract class LuaLibraries
This commit is contained in:
parent
89a66563f1
commit
f57897515e
|
@ -102,9 +102,6 @@ namespace BizHawk.Client.Common
|
|||
public string GetBoardName() => APIs.Emulation.GetBoardName();
|
||||
|
||||
[LuaMethod("getluacore", "returns the name of the Lua core currently in use")]
|
||||
public string GetLuaBackend()
|
||||
{
|
||||
return Lua.WhichLua;
|
||||
}
|
||||
public string GetLuaBackend() => _luaLibsImpl.EngineName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,9 @@ namespace BizHawk.Client.Common
|
|||
public abstract class LuaLibraries
|
||||
{
|
||||
public readonly LuaDocumentation Docs = new LuaDocumentation();
|
||||
|
||||
public abstract string EngineName { get; }
|
||||
|
||||
public abstract LuaFunctionList RegisteredFunctions { get; }
|
||||
public abstract GuiLuaLibrary GuiLibrary { get; }
|
||||
protected readonly Dictionary<Type, LuaLibraryBase> Libraries = new Dictionary<Type, LuaLibraryBase>();
|
||||
|
|
|
@ -10,6 +10,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
/// </summary>
|
||||
public sealed class UnixLuaLibraries : LuaLibraries
|
||||
{
|
||||
public override string EngineName => null;
|
||||
|
||||
public override void CallExitEvent(LuaFile lf)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -116,6 +116,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private EmulationLuaLibrary EmulationLuaLibrary => (EmulationLuaLibrary)Libraries[typeof(EmulationLuaLibrary)];
|
||||
|
||||
public override string EngineName => Lua.WhichLua;
|
||||
|
||||
public override GuiLuaLibrary GuiLibrary => (GuiLuaLibrary) Libraries[typeof(GuiLuaLibrary)];
|
||||
|
||||
private static void LogToLuaConsole(object outputs) => _logToLuaConsoleCallback(new[] { outputs });
|
||||
|
|
Loading…
Reference in New Issue