PerfMon: Fix statistics for games with idle frames

This commit is contained in:
refractionpcsx2 committed 2023-12-23 19:17:01 +00:00
1 parent 18fea6440e
commit 3edd508fc8
3 files changed
+8 -4

No files matched your search

+4 -2
View File
@@ -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()
+1 -1
View File
@@ -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]; }
+3 -1
View File
@@ -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();