parent
22e35c45fc
commit
a31ecb7c0f
|
@ -34,6 +34,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
|
|||
IsLagFrame = true;
|
||||
// run the core for one frame
|
||||
Api.core.snes_run(false);
|
||||
AdvanceRtc();
|
||||
FrameAdvancePost();
|
||||
|
||||
return true;
|
||||
|
@ -55,7 +56,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
|
|||
int numSamples = UpdateAudioBuffer();
|
||||
_soundProvider.PutSamples(_audioBuffer, numSamples / 2);
|
||||
Frame++;
|
||||
AdvanceRtc();
|
||||
|
||||
if (IsLagFrame)
|
||||
{
|
||||
|
|
|
@ -348,10 +348,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
|
|||
private long _clockTime;
|
||||
private int _clockRemainder;
|
||||
|
||||
protected void InitializeRtc(DateTime start)
|
||||
private void InitializeRtc(DateTime start)
|
||||
=> _clockTime = (long)(start - _epoch).TotalSeconds;
|
||||
|
||||
private void AdvanceRtc()
|
||||
internal void AdvanceRtc()
|
||||
{
|
||||
_clockRemainder += VsyncDenominator;
|
||||
if (_clockRemainder >= VsyncNumerator)
|
||||
|
|
|
@ -81,6 +81,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
|
|||
}
|
||||
|
||||
if (!framePassed) _bsnesCore.IsLagFrame = false;
|
||||
if (framePassed) _bsnesCore.AdvanceRtc();
|
||||
_bsnesCore.FrameAdvancePost();
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue