From 27d571c08436e7131f67fed2771434a571c1e976 Mon Sep 17 00:00:00 2001
From: Fernando Sahmkow <fsahmkow27@gmail.com>
Date: Tue, 8 Oct 2019 18:35:04 -0400
Subject: [PATCH] Kernel: Correct redundant yields to only advance time
 forward.

---
 src/core/hle/kernel/svc.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 823d1d4032..101f72b7d4 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -1577,10 +1577,12 @@ static void SleepThread(Core::System& system, s64 nanoseconds) {
     }
 
     if (redundant) {
-        system.CoreTiming().Idle();
-    } else {
-        system.PrepareReschedule(current_thread->GetProcessorID());
+        // If it's redundant, the core is pretty much idle. Some games keep idling
+        // a core while it's doing nothing, we advance timing to avoid costly continuos
+        // calls.
+        system.CoreTiming().AddTicks(2000);
     }
+    system.PrepareReschedule(current_thread->GetProcessorID());
 }
 
 /// Wait process wide key atomic