diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-03-16 02:34:22 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-06-27 17:35:52 +0200 |
commit | 5d3a2be04f265c2d6a8687431593029f7329060f (patch) | |
tree | fa4475df8c0d09aa9e3fe92c6e9ed8dcb5bc267f /src/core/cpu_manager.cpp | |
parent | ARM: Addapt to new Exclusive Monitor Interface. (diff) | |
download | yuzu-5d3a2be04f265c2d6a8687431593029f7329060f.tar yuzu-5d3a2be04f265c2d6a8687431593029f7329060f.tar.gz yuzu-5d3a2be04f265c2d6a8687431593029f7329060f.tar.bz2 yuzu-5d3a2be04f265c2d6a8687431593029f7329060f.tar.lz yuzu-5d3a2be04f265c2d6a8687431593029f7329060f.tar.xz yuzu-5d3a2be04f265c2d6a8687431593029f7329060f.tar.zst yuzu-5d3a2be04f265c2d6a8687431593029f7329060f.zip |
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 @@ #include "core/core.h" #include "core/core_timing.h" #include "core/cpu_manager.h" +#include "core/frontend/emu_window.h" #include "core/gdbstub/gdbstub.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/physical_core.h" @@ -21,7 +22,17 @@ CpuManager::CpuManager(System& system) : system{system} {} CpuManager::~CpuManager() = default; void CpuManager::ThreadStart(CpuManager& cpu_manager, std::size_t core) { + if (!cpu_manager.is_async_gpu && !cpu_manager.is_multicore) { + cpu_manager.render_window->MakeCurrent(); + } cpu_manager.RunThread(core); + if (!cpu_manager.is_async_gpu && !cpu_manager.is_multicore) { + cpu_manager.render_window->DoneCurrent(); + } +} + +void CpuManager::SetRenderWindow(Core::Frontend::EmuWindow& render_window) { + this->render_window = &render_window; } void CpuManager::Initialize() { |