diff options
| author | 2021-08-07 12:33:07 -0700 | |
|---|---|---|
| committer | 2021-08-07 12:33:07 -0700 | |
| commit | 9e3d1d865c4baf2cfc3bf937136eb7625091603f (patch) | |
| tree | fc0285bc44e76996e7a94cf2a76a782f87c27789 /src/core/cpu_manager.cpp | |
| parent | core: hle: service: buffer_queue: Improve management of KEvent. (diff) | |
| download | yuzu-9e3d1d865c4baf2cfc3bf937136eb7625091603f.tar.gz yuzu-9e3d1d865c4baf2cfc3bf937136eb7625091603f.tar.xz yuzu-9e3d1d865c4baf2cfc3bf937136eb7625091603f.zip | |
core: cpu_manager: Use invalid core_id on init and simplify shutdown.
Diffstat (limited to 'src/core/cpu_manager.cpp')
| -rw-r--r-- | src/core/cpu_manager.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp index e2c4f0e07..35c1a6cbd 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp | |||
| @@ -33,7 +33,7 @@ void CpuManager::Initialize() { | |||
| 33 | core_data[core].host_thread = std::jthread(ThreadStart, std::ref(*this), core); | 33 | core_data[core].host_thread = std::jthread(ThreadStart, std::ref(*this), core); |
| 34 | } | 34 | } |
| 35 | } else { | 35 | } else { |
| 36 | core_data[0].host_thread = std::jthread(ThreadStart, std::ref(*this), 0); | 36 | core_data[0].host_thread = std::jthread(ThreadStart, std::ref(*this), -1); |
| 37 | } | 37 | } |
| 38 | } | 38 | } |
| 39 | 39 | ||
| @@ -348,13 +348,9 @@ void CpuManager::RunThread(std::stop_token stop_token, std::size_t core) { | |||
| 348 | sc_sync_first_use = false; | 348 | sc_sync_first_use = false; |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | // Abort if emulation was killed before the session really starts | 351 | // Emulation was stopped |
| 352 | if (!system.IsPoweredOn()) { | ||
| 353 | return; | ||
| 354 | } | ||
| 355 | |||
| 356 | if (stop_token.stop_requested()) { | 352 | if (stop_token.stop_requested()) { |
| 357 | break; | 353 | return; |
| 358 | } | 354 | } |
| 359 | 355 | ||
| 360 | auto current_thread = system.Kernel().CurrentScheduler()->GetCurrentThread(); | 356 | auto current_thread = system.Kernel().CurrentScheduler()->GetCurrentThread(); |