From da2caa929f2ec17de2403a08d27a258ef8891abb Mon Sep 17 00:00:00 2001 From: emmauss Date: Wed, 12 Feb 2020 09:26:24 +0000 Subject: [PATCH] rebase, and move swap check to flinger --- Ryujinx.HLE/HOS/Services/SurfaceFlinger/NvFlinger.cs | 7 ++++--- Ryujinx.HLE/Switch.cs | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/NvFlinger.cs b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/NvFlinger.cs index b3cbfaf29c..a8cd5d1203 100644 --- a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/NvFlinger.cs +++ b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/NvFlinger.cs @@ -150,11 +150,12 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger if (context.Device.EnableDeviceVsync) { - context.Device.VsyncEvent.WaitOne(); + for (int i = 0; i < queueBufferObject.SwapInterval; i++) + { + context.Device.VsyncEvent.WaitOne(); + } } - context.Device.NextSwapInterval = queueBufferObject.SwapInterval; - return MakeReplyParcel(context, 1280, 720, 0, 0, 0); } diff --git a/Ryujinx.HLE/Switch.cs b/Ryujinx.HLE/Switch.cs index d10fe17237..b7db5c6251 100644 --- a/Ryujinx.HLE/Switch.cs +++ b/Ryujinx.HLE/Switch.cs @@ -34,8 +34,6 @@ namespace Ryujinx.HLE public AutoResetEvent VsyncEvent { get; private set; } - public int NextSwapInterval { get; set; } - public event EventHandler Finish; public Switch(VirtualFileSystem fileSystem, ContentManager contentManager, IRenderer renderer, IAalOutput audioOut)