summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-13 00:55:53 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:35:49 +0200
commit1a5f2e290ba831ad6d18514bcdfcd92673643e4b (patch)
treec9864cce7d381dd97d83a307e2ea0b031f3f51aa
parentScheduler: Correct yielding interaction with SetThreadActivity. (diff)
downloadyuzu-1a5f2e290ba831ad6d18514bcdfcd92673643e4b.tar
yuzu-1a5f2e290ba831ad6d18514bcdfcd92673643e4b.tar.gz
yuzu-1a5f2e290ba831ad6d18514bcdfcd92673643e4b.tar.bz2
yuzu-1a5f2e290ba831ad6d18514bcdfcd92673643e4b.tar.lz
yuzu-1a5f2e290ba831ad6d18514bcdfcd92673643e4b.tar.xz
yuzu-1a5f2e290ba831ad6d18514bcdfcd92673643e4b.tar.zst
yuzu-1a5f2e290ba831ad6d18514bcdfcd92673643e4b.zip
-rw-r--r--src/core/cpu_manager.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp
index 9e2e6d49f..e92b0fb37 100644
--- a/src/core/cpu_manager.cpp
+++ b/src/core/cpu_manager.cpp
@@ -39,9 +39,14 @@ void CpuManager::Initialize() {
void CpuManager::Shutdown() {
running_mode = false;
Pause(false);
- for (std::size_t core = 0; core < Core::Hardware::NUM_CPU_CORES; core++) {
- core_data[core].host_thread->join();
- core_data[core].host_thread.reset();
+ if (is_multicore) {
+ for (std::size_t core = 0; core < Core::Hardware::NUM_CPU_CORES; core++) {
+ core_data[core].host_thread->join();
+ core_data[core].host_thread.reset();
+ }
+ } else {
+ core_data[0].host_thread->join();
+ core_data[0].host_thread.reset();
}
}