Skip to content

Commit

Permalink
IInputPollable - Make IsLagFrame settable
Browse files Browse the repository at this point in the history
  • Loading branch information
scrimpeh committed Jan 26, 2016
1 parent f145f3c commit ef1bc65
Show file tree
Hide file tree
Showing 25 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion BizHawk.Emulation.Common/Interfaces/IInputPollable.cs
Expand Up @@ -11,7 +11,7 @@ public interface IInputPollable : IEmulatorService
/// If the current frame is a lag frame.
/// All cores should define it the same, a lag frame is a frame in which input was not polled.
/// </summary>
bool IsLagFrame { get; }
bool IsLagFrame { get; set; }

IInputCallbackSystem InputCallbacks { get; }
}
Expand Down
1 change: 1 addition & 0 deletions BizHawk.Emulation.Cores/Calculator/TI83.IInputPollable.cs
Expand Up @@ -19,6 +19,7 @@ public int LagCount
public bool IsLagFrame
{
get { return _isLag; }
set { _isLag = value; }
}
}
}
Expand Up @@ -9,7 +9,7 @@ public partial class AppleII : IInputPollable
public bool IsLagFrame
{
get { return _machine.Lagged; }
private set { _machine.Lagged = value; }
set { _machine.Lagged = value; }
}

public IInputCallbackSystem InputCallbacks { get; private set; }
Expand Down
Expand Up @@ -7,6 +7,7 @@ public partial class C64 : IInputPollable
public bool IsLagFrame
{
get { return _islag; }
set { _islag = value; }
}

public int LagCount
Expand Down
Expand Up @@ -13,6 +13,7 @@ public int LagCount
public bool IsLagFrame
{
get { return _islag; }
set { _islag = value; }
}

public IInputCallbackSystem InputCallbacks { get; private set; }
Expand Down
Expand Up @@ -13,6 +13,7 @@ public int LagCount
public bool IsLagFrame
{
get { return _islag; }
set { _islag = value; }
}

public IInputCallbackSystem InputCallbacks { get; private set; }
Expand Down
Expand Up @@ -10,7 +10,7 @@ public partial class Lynx : IInputPollable
{
public int LagCount { get; set; }

public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }

// TODO
public IInputCallbackSystem InputCallbacks
Expand Down
Expand Up @@ -14,6 +14,7 @@ public int LagCount
public bool IsLagFrame
{
get { return _isLag; }
set { _isLag = value; }
}

public IInputCallbackSystem InputCallbacks
Expand Down
2 changes: 1 addition & 1 deletion BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs
Expand Up @@ -371,7 +371,7 @@ public byte[] SaveStateBinary()
}

public int LagCount { get; set; }
public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }

[FeatureNotImplemented]
public IInputCallbackSystem InputCallbacks
Expand Down
2 changes: 1 addition & 1 deletion BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs
Expand Up @@ -102,7 +102,7 @@ public void FrameAdvance(bool render, bool rendersound = true)

public int Frame { get; private set; }
public int LagCount { get; set; }
public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }

private readonly InputCallbackSystem _inputCallbacks = new InputCallbackSystem();

Expand Down
2 changes: 1 addition & 1 deletion BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs
Expand Up @@ -116,7 +116,7 @@ public void FrameAdvance(bool render, bool rendersound = true)

public int Frame { get; private set; }
public int LagCount { get; set; }
public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }

private ITraceable Tracer { get; set; }

Expand Down
Expand Up @@ -196,7 +196,7 @@ public Gameboy(CoreComm comm, GameInfo game, byte[] file, object Settings, objec

public int Frame { get; set; }
public int LagCount { get; set; }
public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }

// all cycle counts are relative to a 2*1024*1024 mhz refclock

Expand Down
Expand Up @@ -7,7 +7,7 @@ public partial class GambatteLink : IInputPollable
{
public int LagCount { get; set; }

public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }

public IInputCallbackSystem InputCallbacks
{
Expand Down
Expand Up @@ -19,7 +19,7 @@ public bool IsLagFrame
return !_inputProvider.LastFrameInputPolled;
}

internal set
set
{
if (_settings.UseMupenStyleLag)
{
Expand Down
Expand Up @@ -13,6 +13,7 @@ public int LagCount
public bool IsLagFrame
{
get { return islag; }
set { islag = value; }
}

public IInputCallbackSystem InputCallbacks
Expand Down
Expand Up @@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
public partial class QuickNES : IInputPollable
{
public int LagCount { get; set; }
public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }

public IInputCallbackSystem InputCallbacks
{
Expand Down
Expand Up @@ -740,7 +740,7 @@ public IController Controller
int timeFrameCounter;
public int Frame { get { return timeFrameCounter; } set { timeFrameCounter = value; } }
public int LagCount { get; set; }
public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }
public string SystemId { get; private set; }

public string BoardName { get; private set; }
Expand Down
2 changes: 1 addition & 1 deletion BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs
Expand Up @@ -310,7 +310,7 @@ void Init(GameInfo game, byte[] rom)
bool isLag = false;
public int Frame { get { return frame; } set { frame = value; } }
public int LagCount { get { return lagCount; } set { lagCount = value; } }
public bool IsLagFrame { get { return isLag; } }
public bool IsLagFrame { get { return isLag; } set { isLag = value; } }

private readonly InputCallbackSystem _inputCallbacks = new InputCallbackSystem();
public IInputCallbackSystem InputCallbacks { get { return _inputCallbacks; } }
Expand Down
2 changes: 1 addition & 1 deletion BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs
Expand Up @@ -310,7 +310,7 @@ public ISoundProvider SoundProvider

public int Frame { get; set; }
public int LagCount { get { return _lagcount; } set { _lagcount = value; } }
public bool IsLagFrame { get { return islag; } }
public bool IsLagFrame { get { return islag; } set { islag = value; } }
public bool DeterministicEmulation { get { return true; } }
public string SystemId { get { return "GEN"; } }

Expand Down
2 changes: 1 addition & 1 deletion BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs
Expand Up @@ -78,7 +78,7 @@ public void StoreSaveRam(byte[] data)
bool isLag = false;
public int Frame { get { return frame; } set { frame = value; } }
public int LagCount { get { return lagCount; } set { lagCount = value; } }
public bool IsLagFrame { get { return isLag; } }
public bool IsLagFrame { get { return isLag; } set { isLag = value; } }

private readonly InputCallbackSystem _inputCallbacks = new InputCallbackSystem();
public IInputCallbackSystem InputCallbacks { get { return _inputCallbacks; } }
Expand Down
Expand Up @@ -10,7 +10,7 @@ public partial class Yabause : IInputPollable
{
public int LagCount { get; set; }

public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }

// TODO: optimize managed to unmanaged using the ActiveChanged event
public IInputCallbackSystem InputCallbacks
Expand Down
2 changes: 1 addition & 1 deletion BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs
Expand Up @@ -475,7 +475,7 @@ public void FrameAdvance(bool render, bool rendersound = true)

public int Frame { get; private set; }
public int LagCount { get; set; }
public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }

public string SystemId { get { return "GEN"; } }
public bool DeterministicEmulation { get { return true; } }
Expand Down
2 changes: 1 addition & 1 deletion BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs
Expand Up @@ -769,7 +769,7 @@ public void FrameAdvance(bool render, bool rendersound)

public int Frame { get; private set; }
public int LagCount { get; set; }
public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }

public IInputCallbackSystem InputCallbacks
{
Expand Down
2 changes: 1 addition & 1 deletion BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs
Expand Up @@ -101,7 +101,7 @@ public void ResetCounters()

public int Frame { get; private set; }
public int LagCount { get; set; }
public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }

public string SystemId { get { return "WSWAN"; } }
public bool DeterministicEmulation { get; private set; }
Expand Down
2 changes: 1 addition & 1 deletion BizHawk.Emulation.Cores/Libretro/LibRetroEmulator.cs
Expand Up @@ -903,7 +903,7 @@ public int VirtualHeight

#region IInputPollable
public int LagCount { get; set; }
public bool IsLagFrame { get; private set; }
public bool IsLagFrame { get; set; }
public IInputCallbackSystem InputCallbacks
{
[FeatureNotImplemented]
Expand Down

0 comments on commit ef1bc65

Please sign in to comment.