From 5a87e58183578f5b84ca8d01cbb76aed11820f78 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 30 Oct 2018 11:42:27 -0300 Subject: [PATCH] Fix regression caused by wrong time delta calculation on cache deletion methods --- ChocolArm64/ATranslatorCache.cs | 2 +- Ryujinx.Graphics/Gal/OpenGL/OGLCachedResource.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChocolArm64/ATranslatorCache.cs b/ChocolArm64/ATranslatorCache.cs index 2d6af90b..199b44f8 100644 --- a/ChocolArm64/ATranslatorCache.cs +++ b/ChocolArm64/ATranslatorCache.cs @@ -138,7 +138,7 @@ namespace ChocolArm64 CacheBucket Bucket = Cache[Node.Value]; - long TimeDelta = Bucket.Timestamp - Timestamp; + long TimeDelta = Timestamp - Bucket.Timestamp; if (TimeDelta <= MinTimeDelta) { diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLCachedResource.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLCachedResource.cs index a65ebcbb..efacb4d4 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLCachedResource.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLCachedResource.cs @@ -157,7 +157,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL CacheBucket Bucket = Cache[Node.Value]; - long TimeDelta = Bucket.Timestamp - Timestamp; + long TimeDelta = Timestamp - Bucket.Timestamp; if ((uint)TimeDelta <= (uint)MaxTimeDelta) {