mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
overlays: Fix frametime graph spikes
The frametime_timer was restarted at the end of the update method, instead of immediately after reading its value. This means that the frametime was lower than expected when an expensive task was executed in-between.
This commit is contained in:
parent
801467e565
commit
663b2c9c5e
@ -137,7 +137,7 @@ public:
|
||||
DWORD const id = GetCurrentProcessId();
|
||||
|
||||
// then get a process list snapshot.
|
||||
HANDLE const snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPALL, 0);
|
||||
HANDLE const snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
||||
|
||||
// initialize the process entry structure.
|
||||
PROCESSENTRY32 entry = {0};
|
||||
|
@ -385,6 +385,7 @@ namespace rsx
|
||||
if (m_frametime_graph_enabled)
|
||||
{
|
||||
const auto elapsed_frame = m_frametime_timer.GetElapsedTimeInMilliSec();
|
||||
m_frametime_timer.Start();
|
||||
m_frametime_graph.record_datapoint(static_cast<float>(elapsed_frame));
|
||||
}
|
||||
|
||||
@ -549,7 +550,6 @@ namespace rsx
|
||||
if (m_frametime_graph_enabled)
|
||||
{
|
||||
m_frametime_graph.update();
|
||||
m_frametime_timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user