diff options
Diffstat (limited to 'src/core/cpu_manager.cpp')
| -rw-r--r-- | src/core/cpu_manager.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp index e92b0fb37..d7bd162bc 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "core/core.h" | 9 | #include "core/core.h" |
| 10 | #include "core/core_timing.h" | 10 | #include "core/core_timing.h" |
| 11 | #include "core/cpu_manager.h" | 11 | #include "core/cpu_manager.h" |
| 12 | #include "core/frontend/emu_window.h" | ||
| 12 | #include "core/gdbstub/gdbstub.h" | 13 | #include "core/gdbstub/gdbstub.h" |
| 13 | #include "core/hle/kernel/kernel.h" | 14 | #include "core/hle/kernel/kernel.h" |
| 14 | #include "core/hle/kernel/physical_core.h" | 15 | #include "core/hle/kernel/physical_core.h" |
| @@ -21,7 +22,17 @@ CpuManager::CpuManager(System& system) : system{system} {} | |||
| 21 | CpuManager::~CpuManager() = default; | 22 | CpuManager::~CpuManager() = default; |
| 22 | 23 | ||
| 23 | void CpuManager::ThreadStart(CpuManager& cpu_manager, std::size_t core) { | 24 | void CpuManager::ThreadStart(CpuManager& cpu_manager, std::size_t core) { |
| 25 | if (!cpu_manager.is_async_gpu && !cpu_manager.is_multicore) { | ||
| 26 | cpu_manager.render_window->MakeCurrent(); | ||
| 27 | } | ||
| 24 | cpu_manager.RunThread(core); | 28 | cpu_manager.RunThread(core); |
| 29 | if (!cpu_manager.is_async_gpu && !cpu_manager.is_multicore) { | ||
| 30 | cpu_manager.render_window->DoneCurrent(); | ||
| 31 | } | ||
| 32 | } | ||
| 33 | |||
| 34 | void CpuManager::SetRenderWindow(Core::Frontend::EmuWindow& render_window) { | ||
| 35 | this->render_window = &render_window; | ||
| 25 | } | 36 | } |
| 26 | 37 | ||
| 27 | void CpuManager::Initialize() { | 38 | void CpuManager::Initialize() { |