mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-06-29 23:00:47 -07:00
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:
committed by
Thomas Guillemard
parent
fc77b089a6
commit
db1a759c59
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user