Make the lag counter settable, and expose this functionality in lua
This commit is contained in:
parent
9455aec767
commit
3541c9e975
|
@ -191,6 +191,22 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
[LuaMethodAttributes(
|
||||
"setlagcount",
|
||||
"Sets the current lag count"
|
||||
)]
|
||||
public void SetLagCount(int count)
|
||||
{
|
||||
if (InputPollableCore != null)
|
||||
{
|
||||
InputPollableCore.LagCount = count;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log(string.Format("Can not set lag information, {0} does not implement IInputPollable", Emulator.Attributes().CoreName));
|
||||
}
|
||||
}
|
||||
|
||||
[LuaMethodAttributes(
|
||||
"limitframerate",
|
||||
"sets the limit framerate property of the emulator"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/// <summary>
|
||||
/// The lag count.
|
||||
/// </summary>
|
||||
int LagCount { get; }
|
||||
int LagCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the current frame is a lag frame.
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace BizHawk.Emulation.Cores.Calculators
|
|||
public int LagCount
|
||||
{
|
||||
get { return _lagCount; }
|
||||
set { _lagCount = value; }
|
||||
}
|
||||
|
||||
public IInputCallbackSystem InputCallbacks { get; private set; }
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
|
|||
{
|
||||
public partial class AppleII : IInputPollable
|
||||
{
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
|
||||
public bool IsLagFrame
|
||||
{
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
|
|||
public int LagCount
|
||||
{
|
||||
get { return _lagcount; }
|
||||
set { _lagcount = value; }
|
||||
}
|
||||
|
||||
public IInputCallbackSystem InputCallbacks { get; private set; }
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
public int LagCount
|
||||
{
|
||||
get { return _lagcount; }
|
||||
set { _lagcount = value; }
|
||||
}
|
||||
|
||||
public bool IsLagFrame
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
|
|||
public int LagCount
|
||||
{
|
||||
get { return _lagcount; }
|
||||
set { _lagcount = value; }
|
||||
}
|
||||
|
||||
public bool IsLagFrame
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx
|
|||
{
|
||||
public partial class Lynx : IInputPollable
|
||||
{
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
|
||||
public bool IsLagFrame { get; private set; }
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision
|
|||
public int LagCount
|
||||
{
|
||||
get { return _lagCount; }
|
||||
set { _lagCount = value; }
|
||||
}
|
||||
|
||||
public bool IsLagFrame
|
||||
|
|
|
@ -340,7 +340,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
return savebuff2;
|
||||
}
|
||||
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
public bool IsLagFrame { get; private set; }
|
||||
|
||||
[FeatureNotImplemented]
|
||||
|
|
|
@ -101,7 +101,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
}
|
||||
|
||||
public int Frame { get; private set; }
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
public bool IsLagFrame { get; private set; }
|
||||
|
||||
private readonly InputCallbackSystem _inputCallbacks = new InputCallbackSystem();
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
}
|
||||
|
||||
public int Frame { get; private set; }
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
public bool IsLagFrame { get; private set; }
|
||||
|
||||
private ITraceable Tracer { get; set; }
|
||||
|
|
|
@ -192,7 +192,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
|||
internal IntPtr GambatteState = IntPtr.Zero;
|
||||
|
||||
public int Frame { get; set; }
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
public bool IsLagFrame { get; private set; }
|
||||
|
||||
// all cycle counts are relative to a 2*1024*1024 mhz refclock
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
public partial class N64 : IInputPollable
|
||||
{
|
||||
public int Frame { get; private set; }
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
|
||||
public bool IsLagFrame
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
public int LagCount
|
||||
{
|
||||
get { return _lagcount; }
|
||||
set { _lagcount = value; }
|
||||
}
|
||||
|
||||
public bool IsLagFrame
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
|||
{
|
||||
public partial class QuickNES : IInputPollable
|
||||
{
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
public bool IsLagFrame { get; private set; }
|
||||
|
||||
public IInputCallbackSystem InputCallbacks
|
||||
|
|
|
@ -713,7 +713,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
|||
|
||||
int timeFrameCounter;
|
||||
public int Frame { get { return timeFrameCounter; } set { timeFrameCounter = value; } }
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
public bool IsLagFrame { get; private set; }
|
||||
public string SystemId { get; private set; }
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
bool lagged = true;
|
||||
bool isLag = false;
|
||||
public int Frame { get { return frame; } set { frame = value; } }
|
||||
public int LagCount { get { return lagCount; } }
|
||||
public int LagCount { get { return lagCount; } set { lagCount = value; } }
|
||||
public bool IsLagFrame { get { return isLag; } }
|
||||
|
||||
private readonly InputCallbackSystem _inputCallbacks = new InputCallbackSystem();
|
||||
|
|
|
@ -309,7 +309,7 @@ namespace BizHawk.Emulation.Cores.Sega.Genesis
|
|||
public void EndAsyncSound() { }
|
||||
|
||||
public int Frame { get; set; }
|
||||
public int LagCount { get { return _lagcount; } }
|
||||
public int LagCount { get { return _lagcount; } set { _lagcount = value; } }
|
||||
public bool IsLagFrame { get { return islag; } }
|
||||
public bool DeterministicEmulation { get { return true; } }
|
||||
public string SystemId { get { return "GEN"; } }
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
|||
bool lagged = true;
|
||||
bool isLag = false;
|
||||
public int Frame { get { return frame; } set { frame = value; } }
|
||||
public int LagCount { get { return lagCount; } }
|
||||
public int LagCount { get { return lagCount; } set { lagCount = value; } }
|
||||
public bool IsLagFrame { get { return isLag; } }
|
||||
|
||||
private readonly InputCallbackSystem _inputCallbacks = new InputCallbackSystem();
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn
|
|||
{
|
||||
public partial class Yabause : IInputPollable
|
||||
{
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
|
||||
public bool IsLagFrame { get; private set; }
|
||||
|
||||
|
|
|
@ -427,7 +427,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
|
|||
}
|
||||
|
||||
public int Frame { get; private set; }
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
public bool IsLagFrame { get; private set; }
|
||||
|
||||
public string SystemId { get { return "GEN"; } }
|
||||
|
|
|
@ -429,7 +429,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
|
|||
}
|
||||
|
||||
public int Frame { get; private set; }
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
public bool IsLagFrame { get; private set; }
|
||||
|
||||
public string SystemId { get { return "GEN"; } }
|
||||
|
|
|
@ -659,7 +659,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
|
|||
public IController Controller { get; set; }
|
||||
|
||||
public int Frame { get; private set; }
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
public bool IsLagFrame { get; private set; }
|
||||
|
||||
[FeatureNotImplemented]
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace BizHawk.Emulation.Cores.WonderSwan
|
|||
IntPtr Core;
|
||||
|
||||
public int Frame { get; private set; }
|
||||
public int LagCount { get; private set; }
|
||||
public int LagCount { get; set; }
|
||||
public bool IsLagFrame { get; private set; }
|
||||
|
||||
public string SystemId { get { return "WSWAN"; } }
|
||||
|
|
Loading…
Reference in New Issue