lag frame in mgba

This commit is contained in:
goyuken 2015-06-10 01:19:09 +00:00
parent 7a090edcb0
commit b2ead68c4d
2 changed files with 4 additions and 2 deletions

View File

@ -25,7 +25,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
public static extern bool BizLoad(IntPtr ctx, byte[] data, int length);
[DllImport(dll, CallingConvention = cc)]
public static extern void BizAdvance(IntPtr ctx, LibVBANext.Buttons keys, int[] vbuff, ref int nsamp, short[] sbuff,
public static extern bool BizAdvance(IntPtr ctx, LibVBANext.Buttons keys, int[] vbuff, ref int nsamp, short[] sbuff,
long time, short gyrox, short gyroy, short gyroz, byte luma);
[StructLayout(LayoutKind.Sequential)]

View File

@ -65,12 +65,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
if (Controller["Power"])
LibmGBA.BizReset(core);
LibmGBA.BizAdvance(core, VBANext.GetButtons(Controller), videobuff, ref nsamp, soundbuff,
IsLagFrame = LibmGBA.BizAdvance(core, VBANext.GetButtons(Controller), videobuff, ref nsamp, soundbuff,
0, // TODO RTC hookup
(short)Controller.GetFloat("Tilt X"),
(short)Controller.GetFloat("Tilt Y"),
(short)Controller.GetFloat("Tilt Z"),
(byte)(255 - Controller.GetFloat("Light Sensor")));
if (IsLagFrame)
_lagCount++;
}
public int Frame { get; private set; }