rebase, and move swap check to flinger

This commit is contained in:
emmauss 2020-02-12 09:26:24 +00:00
commit da2caa929f
2 changed files with 4 additions and 5 deletions

View file

@ -149,11 +149,12 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
SendFrameBuffer(context, slot); SendFrameBuffer(context, slot);
if (context.Device.EnableDeviceVsync) if (context.Device.EnableDeviceVsync)
{
for (int i = 0; i < queueBufferObject.SwapInterval; i++)
{ {
context.Device.VsyncEvent.WaitOne(); context.Device.VsyncEvent.WaitOne();
} }
}
context.Device.NextSwapInterval = queueBufferObject.SwapInterval;
return MakeReplyParcel(context, 1280, 720, 0, 0, 0); return MakeReplyParcel(context, 1280, 720, 0, 0, 0);
} }

View file

@ -34,8 +34,6 @@ namespace Ryujinx.HLE
public AutoResetEvent VsyncEvent { get; private set; } public AutoResetEvent VsyncEvent { get; private set; }
public int NextSwapInterval { get; set; }
public event EventHandler Finish; public event EventHandler Finish;
public Switch(VirtualFileSystem fileSystem, ContentManager contentManager, IRenderer renderer, IAalOutput audioOut) public Switch(VirtualFileSystem fileSystem, ContentManager contentManager, IRenderer renderer, IAalOutput audioOut)