diff options
| author | emmauss <emmausssss@gmail.com> | 2018-09-10 02:38:56 +0300 |
|---|---|---|
| committer | Thomas Guillemard <thog@protonmail.com> | 2018-09-10 01:38:56 +0200 |
| commit | db1a759c5927f2df9ddd9a08fd691f99bf10e6f8 (patch) | |
| tree | 5f11107dd4b3672a6c2e4627154ca27f7f15083e /Ryujinx.HLE/Switch.cs | |
| parent | fc77b089a6ab600ac6f954cb193d26239008975f (diff) | |
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
Diffstat (limited to 'Ryujinx.HLE/Switch.cs')
| -rw-r--r-- | Ryujinx.HLE/Switch.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Ryujinx.HLE/Switch.cs b/Ryujinx.HLE/Switch.cs index 70bd7060..a3f874ee 100644 --- a/Ryujinx.HLE/Switch.cs +++ b/Ryujinx.HLE/Switch.cs @@ -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(); } } } |
