Lua - gameinfo library - convert to using service injection

This commit is contained in:
adelikat 2015-01-01 20:08:03 +00:00
parent f6c2b4e897
commit b6e33d010a
1 changed files with 5 additions and 1 deletions

View File

@ -1,10 +1,14 @@
using System;
using LuaInterface;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.Common
{
public sealed class GameInfoLuaLibrary : LuaLibraryBase
{
[RequiredService]
public IEmulator Emulator { get; set; }
public GameInfoLuaLibrary(Lua lua)
: base(lua) { }
@ -89,7 +93,7 @@ namespace BizHawk.Client.Common
)]
public string GetBoardType()
{
return Global.Emulator.BoardName;
return Emulator.BoardName ?? "";
}
[LuaMethodAttributes(