Skip to content

Commit

Permalink
Add Frame Counter
Browse files Browse the repository at this point in the history
  • Loading branch information
enusbaum committed Nov 21, 2024
1 parent 1308c4f commit e76bb2e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ADNES/Emulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public class Emulator(
/// </summary>
public long TotalPPUCycles => _ppu.Cycles;

/// <summary>
/// Total Frames Rendered by the NES Emulator
/// </summary>
public long TotalFrames;

/// <summary>
/// Height of Frames Rendered by the NES Emulator
/// </summary>
Expand Down Expand Up @@ -199,6 +204,7 @@ private void Run()
if (_ppu.FrameReady)
{
processFrameDelegate(_ppu.FrameBuffer);
TotalFrames++;
_ppu.FrameReady = false;

//Throttle our frame rate here to the desired rate (if required)
Expand Down

0 comments on commit e76bb2e

Please sign in to comment.