summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorGravatar Liam2022-06-18 16:54:33 -0400
committerGravatar Liam2022-06-18 16:54:33 -0400
commit24d7aaf43c6b243f7123401545527ed7a25a3f26 (patch)
treeae068bba2c935e18d3e05557d1f581765114ad94 /src/core/hle/kernel/kernel.cpp
parentMerge pull request #8476 from liamwhite/gpu-wasnt-ready (diff)
downloadyuzu-24d7aaf43c6b243f7123401545527ed7a25a3f26.tar.gz
yuzu-24d7aaf43c6b243f7123401545527ed7a25a3f26.tar.xz
yuzu-24d7aaf43c6b243f7123401545527ed7a25a3f26.zip
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.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) {
1079 1079
1080 for (auto* process : GetProcessList()) { 1080 for (auto* process : GetProcessList()) {
1081 process->SetActivity(activity); 1081 process->SetActivity(activity);
1082
1083 if (should_suspend) {
1084 // Wait for execution to stop
1085 for (auto* thread : process->GetThreadList()) {
1086 thread->WaitUntilSuspended();
1087 }
1088 }
1082 } 1089 }
1083} 1090}
1084 1091