Deprecate emu.getluacore in favour of new func client.get_lua_engine

This commit is contained in:
YoshiRulz 2020-12-04 23:46:15 +10:00
parent f57897515e
commit a54aa0706d
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 9 additions and 1 deletions

View File

@ -77,6 +77,9 @@ namespace BizHawk.Client.Common
[LuaMethod("frameskip", "Sets the frame skip value of the client UI (use 0 to disable)")]
public void FrameSkip(int numFrames) => APIs.EmuClient.FrameSkip(numFrames);
[LuaMethod("get_lua_engine", "returns the name of the Lua engine currently in use")]
public string GetLuaEngine() => _luaLibsImpl.EngineName;
[LuaMethodExample("client.invisibleemulation( true );")]
[LuaMethod("invisibleemulation", "Disables and enables emulator updates")]
public void InvisibleEmulation(bool invisible) => APIs.EmuClient.InvisibleEmulation(invisible);

View File

@ -101,7 +101,12 @@ namespace BizHawk.Client.Common
[LuaMethod("getboardname", "returns (if available) the board name of the loaded ROM")]
public string GetBoardName() => APIs.Emulation.GetBoardName();
[LuaDeprecatedMethod]
[LuaMethod("getluacore", "returns the name of the Lua core currently in use")]
public string GetLuaBackend() => _luaLibsImpl.EngineName;
public string GetLuaBackend()
{
Log("Deprecated function emu.getluacore() used, replace the call with client.get_lua_engine().");
return _luaLibsImpl.EngineName;
}
}
}