diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core.cpp | 3 | ||||
-rw-r--r-- | src/core/cpu_manager.cpp | 11 | ||||
-rw-r--r-- | src/core/cpu_manager.h | 7 |
3 files changed, 3 insertions, 18 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 40eea297e..3393c33eb 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -151,7 +151,6 @@ struct System::Impl { cpu_manager.SetMulticore(is_multicore); cpu_manager.SetAsyncGpu(is_async_gpu); core_timing.SetMulticore(is_multicore); - cpu_manager.SetRenderWindow(emu_window); core_timing.Initialize([&system]() { system.RegisterHostThread(); }); kernel.Initialize(); @@ -435,7 +434,7 @@ bool System::IsPoweredOn() const { } void System::PrepareReschedule() { - //impl->CurrentPhysicalCore().Stop(); + // impl->CurrentPhysicalCore().Stop(); } void System::PrepareReschedule(const u32 core_index) { diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp index b7c2a7832..63c578852 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp @@ -9,12 +9,12 @@ #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" #include "core/hle/kernel/scheduler.h" #include "core/hle/kernel/thread.h" +#include "video_core/gpu.h" namespace Core { @@ -25,10 +25,6 @@ void CpuManager::ThreadStart(CpuManager& cpu_manager, std::size_t core) { cpu_manager.RunThread(core); } -void CpuManager::SetRenderWindow(Core::Frontend::EmuWindow& render_window) { - this->render_window = &render_window; -} - void CpuManager::Initialize() { running_mode = true; if (is_multicore) { @@ -354,7 +350,7 @@ void CpuManager::RunThread(std::size_t core) { data.is_running = false; data.enter_barrier->Wait(); if (sc_sync_first_use) { - render_window->MakeCurrent(); + system.GPU().ObtainContext(); sc_sync_first_use = false; } auto& scheduler = system.Kernel().CurrentScheduler(); @@ -366,9 +362,6 @@ void CpuManager::RunThread(std::size_t core) { data.exit_barrier->Wait(); data.is_paused = false; } - if (sc_sync) { - render_window->DoneCurrent(); - } /// Time to cleanup data.host_context->Exit(); data.enter_barrier.reset(); diff --git a/src/core/cpu_manager.h b/src/core/cpu_manager.h index ae55d6427..35929ed94 100644 --- a/src/core/cpu_manager.h +++ b/src/core/cpu_manager.h @@ -16,10 +16,6 @@ class Event; class Fiber; } // namespace Common -namespace Core::Frontend { -class EmuWindow; -} // namespace Core::Frontend - namespace Core { class System; @@ -61,8 +57,6 @@ public: return current_core.load(); } - void SetRenderWindow(Core::Frontend::EmuWindow& render_window); - private: static void GuestThreadFunction(void* cpu_manager); static void GuestRewindFunction(void* cpu_manager); @@ -106,7 +100,6 @@ private: std::size_t preemption_count{}; std::size_t idle_count{}; static constexpr std::size_t max_cycle_runs = 5; - Core::Frontend::EmuWindow* render_window; System& system; }; |