2012-12-19 09:30:18 +00:00
|
|
|
#pragma once
|
2019-01-15 08:10:11 +00:00
|
|
|
#include "../Settings/N64SystemSettings.h"
|
2022-10-10 00:22:17 +00:00
|
|
|
#include <Common/HighResTimeStamp.h>
|
2012-12-19 09:30:18 +00:00
|
|
|
|
2019-01-15 08:10:11 +00:00
|
|
|
class CFramePerSecond : public CN64SystemSettings
|
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);
|
2016-09-16 21:37:27 +00:00
|
|
|
void DisplayViCounter(int32_t FrameRateWhole, uint32_t FrameRateFraction);
|
2015-10-25 11:40:21 +00:00
|
|
|
|
|
|
|
private:
|
2022-10-10 00:22:17 +00:00
|
|
|
CFramePerSecond(const CFramePerSecond &);
|
|
|
|
CFramePerSecond & operator=(const CFramePerSecond &);
|
2016-01-18 08:51:12 +00:00
|
|
|
|
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
|
|
|
|
2022-10-10 00:22:17 +00:00
|
|
|
int32_t m_iFrameRateType, m_ScreenHertz;
|
2015-10-25 11:40:21 +00:00
|
|
|
|
2022-10-10 00:22:17 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
NoOfFrames = 7
|
|
|
|
};
|
2015-10-25 11:40:21 +00:00
|
|
|
|
2016-09-16 21:37:27 +00:00
|
|
|
HighResTimeStamp m_LastViFrame;
|
|
|
|
uint64_t m_ViFrames[NoOfFrames];
|
|
|
|
uint32_t m_CurrentViFrame;
|
|
|
|
int32_t m_ViFrameRateWhole;
|
|
|
|
uint32_t m_ViFrameRateFraction;
|
2016-08-10 10:03:25 +00:00
|
|
|
|
2021-05-18 11:51:36 +00:00
|
|
|
// Dlist
|
2016-09-16 21:37:27 +00:00
|
|
|
HighResTimeStamp m_LastDlistFrame;
|
|
|
|
uint64_t m_FramesDlist[NoOfFrames];
|
|
|
|
uint32_t m_CurrentDlistFrame;
|
2016-08-10 10:03:25 +00:00
|
|
|
float m_DlistFrameRate;
|
2015-01-31 19:27:27 +00:00
|
|
|
};
|