N64: Added an IsVIFrame flag

This commit is contained in:
pjgat09 2014-08-03 00:00:26 +00:00
parent 7b72a43265
commit 5e0ba6cd30
2 changed files with 11 additions and 0 deletions

View File

@ -179,6 +179,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
public void FrameAdvance(bool render, bool rendersound)
{
IsVIFrame = false;
_audioProvider.RenderSound = rendersound;
if (Controller["Reset"])
@ -240,6 +242,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
set { _inputProvider.LastFrameInputPolled = !value; }
}
public bool IsVIFrame
{
get { return _videoProvider.IsVIFrame; }
set { _videoProvider.IsVIFrame = value; }
}
public void ResetCounters()
{
Frame = 0;

View File

@ -9,6 +9,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
private int[] frameBuffer;
private mupen64plusVideoApi api;
public bool IsVIFrame;
/// <summary>
/// Creates N64 Video system with mupen64plus backend
/// </summary>
@ -26,6 +28,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
);
core.BeforeRender += DoVideoFrame;
core.BeforeRender += () => { IsVIFrame = true; };
}
public int[] GetVideoBuffer()