mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +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);
|
||||
}
|
||||
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()
|
||||
|
|
|
@ -127,7 +127,7 @@ bool Profiler::handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter
|
|||
if (viewer)
|
||||
{
|
||||
// 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)
|
||||
CollectStatistics(viewer);
|
||||
|
|
Loading…
Reference in a new issue