소스 검색

Kernel: Correct redundant yields to only advance time forward.

Fernando Sahmkow 6 년 전
부모
커밋
27d571c084
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      src/core/hle/kernel/svc.cpp

+ 5 - 3
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