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
|
2016-08-10 10:03:25 +00:00
|
|
|
#include <Common/DateTimeClass.h>
|
2012-12-19 09:30:18 +00:00
|
|
|
|
2015-12-23 19:41:11 +00:00
|
|
|
class CFramePerSecond
|
2015-10-25 11:40:21 +00:00
|
|
|
{
|
2008-09-18 03:15:49 +00:00
|
|
|
public:
|
2015-12-23 19:41:11 +00:00
|
|
|
CFramePerSecond(void);
|
|
|
|
~CFramePerSecond(void);
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2015-12-23 19:41:11 +00:00
|
|
|
void Reset(bool ClearDisplay);
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2015-12-23 19:41:11 +00:00
|
|
|
void UpdateDlCounter(void);
|
|
|
|
void UpdateViCounter(void);
|
|
|
|
void DisplayViCounter(uint32_t FrameRate);
|
2015-10-25 11:40:21 +00:00
|
|
|
|
|
|
|
private:
|
2016-01-18 08:51:12 +00:00
|
|
|
CFramePerSecond(const CFramePerSecond&); // Disable copy constructor
|
|
|
|
CFramePerSecond& operator=(const CFramePerSecond&); // Disable assignment
|
|
|
|
|
2015-12-23 19:41:11 +00:00
|
|
|
static void FrameRateTypeChanged(CFramePerSecond * _this);
|
|
|
|
static void ScreenHertzChanged(CFramePerSecond * _this);
|
2016-08-10 10:03:25 +00:00
|
|
|
void UpdateDisplay(void);
|
2015-10-25 11:40:21 +00:00
|
|
|
|
2016-01-18 08:51:12 +00:00
|
|
|
int32_t m_iFrameRateType, m_ScreenHertz;
|
2015-10-25 11:40:21 +00:00
|
|
|
|
2015-12-23 19:41:11 +00:00
|
|
|
enum { NoOfFrames = 7 };
|
2015-10-25 11:40:21 +00:00
|
|
|
|
2016-08-10 10:03:25 +00:00
|
|
|
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
|
|
|
};
|