Lua - Convert Gui library to service injection system

This commit is contained in:
adelikat 2015-01-01 21:44:49 +00:00
parent 3710e6c1ca
commit 4e0e5958ed
2 changed files with 8 additions and 3 deletions

View File

@ -55,7 +55,7 @@ namespace BizHawk.Client.EmuHawk
"bufferheight",
"Gets the current height in pixels of the emulator's drawing area"
)]
public static int BufferHeight()
public int BufferHeight()
{
var height = Emulator.VideoProvider.BufferHeight;
var point = new System.Drawing.Point(0, height);
@ -67,7 +67,7 @@ namespace BizHawk.Client.EmuHawk
"bufferwidth",
"Gets the current width in pixels of the emulator's drawing area"
)]
public static int BufferWidth()
public int BufferWidth()
{
var width = Emulator.VideoProvider.BufferWidth;
var point = new System.Drawing.Point(width, 0);

View File

@ -3,13 +3,18 @@ using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using BizHawk.Client.Common;
using LuaInterface;
using BizHawk.Emulation.Common;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
{
public sealed class GuiLuaLibrary : LuaLibraryBase
{
[RequiredService]
public IEmulator Emulator { get; set; }
public GuiLuaLibrary(Lua lua)
: base(lua) { }