mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-16 03:00:36 +01:00
PerfMon: Fix statistics for games with idle frames
This commit is contained in:
1 parent
18fea6440e
commit
3edd508fc8
3 files changed
+8
-4
No files matched your search
@@ -30,10 +30,12 @@ void GSPerfMon::Reset()
|
||||
std::memset(m_stats, 0, sizeof(m_stats));
|
||||
}
|
||||
|
||||
void GSPerfMon::EndFrame()
|
||||
void GSPerfMon::EndFrame(bool frame_only)
|
||||
{
|
||||
m_frame++;
|
||||
m_count++;
|
||||
|
||||
if(!frame_only)
|
||||
m_count++;
|
||||
}
|
||||
|
||||
void GSPerfMon::Update()
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
void SetFrame(u64 frame) { m_frame = frame; }
|
||||
u64 GetFrame() { return m_frame; }
|
||||
void EndFrame();
|
||||
void EndFrame(bool frame_only);
|
||||
|
||||
void Put(counter_t c, double val) { m_counters[c] += val; }
|
||||
double GetCounter(counter_t c) { return m_counters[c]; }
|
||||
|
||||
@@ -602,7 +602,9 @@ void GSRenderer::VSync(u32 field, bool registers_written, bool idle_frame)
|
||||
if (!idle_frame)
|
||||
g_gs_device->AgePool();
|
||||
|
||||
g_perfmon.EndFrame();
|
||||
|
||||
g_perfmon.EndFrame(idle_frame);
|
||||
|
||||
if ((g_perfmon.GetFrame() & 0x1f) == 0)
|
||||
g_perfmon.Update();
|
||||
|
||||
|
||||
Reference in new issue
Block a user