diff options
| author | 2019-10-08 18:35:04 -0400 | |
|---|---|---|
| committer | 2019-10-15 11:55:20 -0400 | |
| commit | 27d571c08436e7131f67fed2771434a571c1e976 (patch) | |
| tree | 1b6714882be298ae3c7e3f616039237861dbe0b9 | |
| parent | Kernel: Corrections to ModifyByWaitingCountAndSignalToAddressIfEqual (diff) | |
| download | yuzu-27d571c08436e7131f67fed2771434a571c1e976.tar.gz yuzu-27d571c08436e7131f67fed2771434a571c1e976.tar.xz yuzu-27d571c08436e7131f67fed2771434a571c1e976.zip | |
Kernel: Correct redundant yields to only advance time forward.
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 823d1d403..101f72b7d 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) { | |||
| 1577 | } | 1577 | } |
| 1578 | 1578 | ||
| 1579 | if (redundant) { | 1579 | if (redundant) { |
| 1580 | system.CoreTiming().Idle(); | 1580 | // If it's redundant, the core is pretty much idle. Some games keep idling |
| 1581 | } else { | 1581 | // a core while it's doing nothing, we advance timing to avoid costly continuos |
| 1582 | system.PrepareReschedule(current_thread->GetProcessorID()); | 1582 | // calls. |
| 1583 | system.CoreTiming().AddTicks(2000); | ||
| 1583 | } | 1584 | } |
| 1585 | system.PrepareReschedule(current_thread->GetProcessorID()); | ||
| 1584 | } | 1586 | } |
| 1585 | 1587 | ||
| 1586 | /// Wait process wide key atomic | 1588 | /// Wait process wide key atomic |