Lock GbpQueueBuffer till Vsync is signalled (#367)

* Initial Framerate limit implementation

* use seperate event for limiter

* check for vsync signal after queue up framebuffer

* removed ingame toggle

* fix nits
This commit is contained in:
emmauss 2018-09-10 02:38:56 +03:00 committed by Thomas Guillemard
parent fc77b089a6
commit db1a759c59
5 changed files with 25 additions and 1 deletions

View file

@ -7,6 +7,7 @@ using Ryujinx.HLE.Input;
using Ryujinx.HLE.Logging;
using Ryujinx.HLE.Memory;
using System;
using System.Threading;
namespace Ryujinx.HLE
{
@ -28,6 +29,12 @@ namespace Ryujinx.HLE
public Hid Hid { get; private set; }
public bool EnableDeviceVsync { get; set; } = true;
public AutoResetEvent VsyncEvent { get; private set; }
public event EventHandler Finish;
public Switch(IGalRenderer Renderer, IAalOutput AudioOut)
{
if (Renderer == null)
@ -55,6 +62,8 @@ namespace Ryujinx.HLE
Statistics = new PerformanceStatistics();
Hid = new Hid(this, System.HidSharedMem.PA);
VsyncEvent = new AutoResetEvent(true);
}
public void LoadCart(string ExeFsDir, string RomFsFile = null)
@ -109,6 +118,8 @@ namespace Ryujinx.HLE
if (Disposing)
{
System.Dispose();
VsyncEvent.Dispose();
}
}
}