diff options
| author | 2022-06-22 14:46:33 -0700 | |
|---|---|---|
| committer | 2022-06-22 14:46:33 -0700 | |
| commit | 9da4e62573cdaa8a48dd18068642b494cfed9a04 (patch) | |
| tree | c179c5fa993f3e840d6e0051ae28ad04520e2723 /src/core/hle/kernel/kernel.cpp | |
| parent | Merge pull request #8455 from lat9nq/mingw-clang (diff) | |
| parent | kernel: wait for threads to stop on pause (diff) | |
| download | yuzu-9da4e62573cdaa8a48dd18068642b494cfed9a04.tar.gz yuzu-9da4e62573cdaa8a48dd18068642b494cfed9a04.tar.xz yuzu-9da4e62573cdaa8a48dd18068642b494cfed9a04.zip | |
Merge pull request #8483 from liamwhite/fire-emblem-three-semaphores
kernel: wait for threads to stop on pause
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 66c8f4455..94953e257 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -1078,6 +1078,13 @@ void KernelCore::Suspend(bool suspended) { | |||
| 1078 | 1078 | ||
| 1079 | for (auto* process : GetProcessList()) { | 1079 | for (auto* process : GetProcessList()) { |
| 1080 | process->SetActivity(activity); | 1080 | process->SetActivity(activity); |
| 1081 | |||
| 1082 | if (should_suspend) { | ||
| 1083 | // Wait for execution to stop | ||
| 1084 | for (auto* thread : process->GetThreadList()) { | ||
| 1085 | thread->WaitUntilSuspended(); | ||
| 1086 | } | ||
| 1087 | } | ||
| 1081 | } | 1088 | } |
| 1082 | } | 1089 | } |
| 1083 | 1090 | ||