summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-06-18 22:54:33 +0200
committerLiam <byteslice@airmail.cc>2022-06-18 22:54:33 +0200
commit24d7aaf43c6b243f7123401545527ed7a25a3f26 (patch)
treeae068bba2c935e18d3e05557d1f581765114ad94 /src/core/hle/kernel/kernel.cpp
parentMerge pull request #8476 from liamwhite/gpu-wasnt-ready (diff)
downloadyuzu-24d7aaf43c6b243f7123401545527ed7a25a3f26.tar
yuzu-24d7aaf43c6b243f7123401545527ed7a25a3f26.tar.gz
yuzu-24d7aaf43c6b243f7123401545527ed7a25a3f26.tar.bz2
yuzu-24d7aaf43c6b243f7123401545527ed7a25a3f26.tar.lz
yuzu-24d7aaf43c6b243f7123401545527ed7a25a3f26.tar.xz
yuzu-24d7aaf43c6b243f7123401545527ed7a25a3f26.tar.zst
yuzu-24d7aaf43c6b243f7123401545527ed7a25a3f26.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/kernel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 73593c7a0..7d9267ddc 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -1079,6 +1079,13 @@ void KernelCore::Suspend(bool suspended) {
for (auto* process : GetProcessList()) {
process->SetActivity(activity);
+
+ if (should_suspend) {
+ // Wait for execution to stop
+ for (auto* thread : process->GetThreadList()) {
+ thread->WaitUntilSuspended();
+ }
+ }
}
}