aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTSRBerry <20988865+TSRBerry@users.noreply.github.com>2023-02-08 01:28:53 +0100
committerGitHub <noreply@github.com>2023-02-08 01:28:53 +0100
commit59755818ef79f494d87c4e9d2b8372b54b38cb9d (patch)
tree7d2ed05128d303b7b1be275a9805074abbc9a34a
parentf8beeeb7d3dca796d05a2ab1d7a8f1af3b7e3fb5 (diff)
Add ChangeVSyncMode() call to Avalonia render loop (#4379)1.1.604
-rw-r--r--Ryujinx.Ava/AppHost.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Ryujinx.Ava/AppHost.cs b/Ryujinx.Ava/AppHost.cs
index 6146a7d9..242c84e7 100644
--- a/Ryujinx.Ava/AppHost.cs
+++ b/Ryujinx.Ava/AppHost.cs
@@ -53,7 +53,6 @@ using Key = Ryujinx.Input.Key;
using MouseButton = Ryujinx.Input.MouseButton;
using Size = Avalonia.Size;
using Switch = Ryujinx.HLE.Switch;
-using WindowState = Avalonia.Controls.WindowState;
namespace Ryujinx.Ava
{
@@ -766,7 +765,7 @@ namespace Ryujinx.Ava
}
}
- private unsafe void RenderLoop()
+ private void RenderLoop()
{
Dispatcher.UIThread.InvokeAsync(() =>
{
@@ -802,6 +801,8 @@ namespace Ryujinx.Ava
Device.Gpu.InitializeShaderCache(_gpuCancellationTokenSource.Token);
Translator.IsReadyForTranslation.Set();
+ _renderer.Window.ChangeVSyncMode(Device.EnableDeviceVsync);
+
while (_isActive)
{
_ticks += _chrono.ElapsedTicks;