Fiked small bug caused by race condition

This commit is contained in:
Andy Adshead 2019-02-16 04:15:37 +00:00
commit 6cd69076d0

View file

@ -238,12 +238,17 @@ namespace Ryujinx.Profiler.UI
_updateTimer += e.Time; _updateTimer += e.Time;
if (_doStep || ((Profile.UpdateRate > 0) && (!_paused && (_updateTimer > Profile.UpdateRate)))) if (_doStep || ((Profile.UpdateRate > 0) && (!_paused && (_updateTimer > Profile.UpdateRate))))
{ {
_updateTimer = 0; _updateTimer = 0;
_unsortedProfileData = Profile.GetProfilingData().ToList(); _captureTime = PerformanceCounter.ElapsedTicks;
_captureTime = PerformanceCounter.ElapsedTicks; _timingFlags = Profile.GetTimingFlags();
_timingFlags = Profile.GetTimingFlags(); _doStep = false;
_profileUpdated = true;
_doStep = false; Dictionary<ProfileConfig, TimingInfo> data = Profile.GetProfilingData();
if (data.Count > 0)
{
_unsortedProfileData = data.ToList();
_profileUpdated = true;
}
} }
// Filtering // Filtering