project64/Source/Project64-core/N64System/FramePerSecondClass.h

49 lines
1.7 KiB
C
Raw Normal View History

2012-12-19 09:30:18 +00:00
/****************************************************************************
* *
2015-11-10 05:21:49 +00:00
* Project64 - A Nintendo 64 emulator. *
2012-12-19 09:30:18 +00:00
* http://www.pj64-emu.com/ *
* Copyright (C) 2012 Project64. All rights reserved. *
* *
* License: *
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
* *
****************************************************************************/
#pragma once
#include <Common/DateTimeClass.h>
2012-12-19 09:30:18 +00:00
class CFramePerSecond
{
public:
CFramePerSecond(void);
~CFramePerSecond(void);
void Reset(bool ClearDisplay);
void UpdateDlCounter(void);
void UpdateViCounter(void);
void DisplayViCounter(uint32_t FrameRate);
private:
CFramePerSecond(const CFramePerSecond&); // Disable copy constructor
CFramePerSecond& operator=(const CFramePerSecond&); // Disable assignment
static void FrameRateTypeChanged(CFramePerSecond * _this);
static void ScreenHertzChanged(CFramePerSecond * _this);
void UpdateDisplay(void);
int32_t m_iFrameRateType, m_ScreenHertz;
enum { NoOfFrames = 7 };
CDateTime m_LastViFrame;
int64_t m_ViFrames[NoOfFrames];
int32_t m_CurrentViFrame;
float m_ViFrameRate;
//Dlist
CDateTime m_LastDlistFrame;
int64_t m_FramesDlist[NoOfFrames];
int32_t m_CurrentDlistFrame;
float m_DlistFrameRate;
2015-01-31 19:27:27 +00:00
};