mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 20:39:40 +00:00
Merge branch 'profiler_fix' into 'master'
Fix profiler glitches (#5850) See merge request OpenMW/openmw!605
This commit is contained in:
commit
561628087c
2 changed files with 8 additions and 1 deletions
|
@ -1867,6 +1867,13 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
doPhysics (duration, frameStart, frameNumber, stats);
|
doPhysics (duration, frameStart, frameNumber, stats);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// zero the async stats if we are paused
|
||||||
|
stats.setAttribute(frameNumber, "physicsworker_time_begin", 0);
|
||||||
|
stats.setAttribute(frameNumber, "physicsworker_time_taken", 0);
|
||||||
|
stats.setAttribute(frameNumber, "physicsworker_time_end", 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::updatePlayer()
|
void World::updatePlayer()
|
||||||
|
|
|
@ -127,7 +127,7 @@ bool Profiler::handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter
|
||||||
if (viewer)
|
if (viewer)
|
||||||
{
|
{
|
||||||
// Add/remove openmw stats to the osd as necessary
|
// Add/remove openmw stats to the osd as necessary
|
||||||
viewer->getViewerStats()->collectStats("engine", _statsType == StatsHandler::StatsType::VIEWER_STATS);
|
viewer->getViewerStats()->collectStats("engine", _statsType >= StatsHandler::StatsType::VIEWER_STATS);
|
||||||
|
|
||||||
if (_offlineCollect)
|
if (_offlineCollect)
|
||||||
CollectStatistics(viewer);
|
CollectStatistics(viewer);
|
||||||
|
|
Loading…
Reference in a new issue