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
|
|
|
|
|
2015-10-25 11:40:21 +00:00
|
|
|
class CFramePerSecond
|
|
|
|
{
|
2008-09-18 03:15:49 +00:00
|
|
|
public:
|
2015-10-25 11:40:21 +00:00
|
|
|
CFramePerSecond ( void );
|
2008-09-18 03:15:49 +00:00
|
|
|
~CFramePerSecond ( void );
|
|
|
|
|
|
|
|
void Reset ( bool ClearDisplay );
|
|
|
|
|
|
|
|
void UpdateDlCounter ( void );
|
|
|
|
void UpdateViCounter ( void );
|
2015-12-06 09:59:58 +00:00
|
|
|
void DisplayDlCounter ( uint32_t FrameRate );
|
|
|
|
void DisplayViCounter ( uint32_t FrameRate );
|
2015-10-25 11:40:21 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
static void FrameRateTypeChanged(CFramePerSecond * _this);
|
|
|
|
static void ScreenHertzChanged(CFramePerSecond * _this);
|
|
|
|
|
|
|
|
int m_iFrameRateType, m_ScreenHertz;
|
|
|
|
|
|
|
|
enum { NoOfFrames = 7 };
|
|
|
|
|
|
|
|
__int64 m_Frequency, m_Frames[NoOfFrames], m_LastFrame;
|
|
|
|
int m_CurrentFrame;
|
2015-01-31 19:27:27 +00:00
|
|
|
};
|