A little bit less naive limiter

This commit is contained in:
ReinUsesLisp 2018-06-26 00:24:57 -03:00
parent d0cb042ff4
commit 3671fa1991

View file

@ -51,19 +51,25 @@ namespace Ryujinx
long TicksPerFrame = Stopwatch.Frequency / 60;
long Ticks = 0;
while (Exists && !IsExiting)
{
ProcessEvents();
if (!IsExiting)
{
if (Chrono.ElapsedTicks > TicksPerFrame)
{
UpdateFrame();
RenderFrame();
Ticks += Chrono.ElapsedTicks;
Chrono.Restart();
if (Ticks > TicksPerFrame)
{
RenderFrame();
Ticks -= TicksPerFrame;
}
}
}