A little bit less naive limiter
This commit is contained in:
parent
d0cb042ff4
commit
3671fa1991
1 changed files with 10 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue