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 { | |||
| 151 | cpu_manager.SetMulticore(is_multicore); | 151 | cpu_manager.SetMulticore(is_multicore); |
| 152 | cpu_manager.SetAsyncGpu(is_async_gpu); | 152 | cpu_manager.SetAsyncGpu(is_async_gpu); |
| 153 | core_timing.SetMulticore(is_multicore); | 153 | core_timing.SetMulticore(is_multicore); |
| 154 | cpu_manager.SetRenderWindow(emu_window); | ||
| 155 | 154 | ||
| 156 | core_timing.Initialize([&system]() { system.RegisterHostThread(); }); | 155 | core_timing.Initialize([&system]() { system.RegisterHostThread(); }); |
| 157 | kernel.Initialize(); | 156 | kernel.Initialize(); |
| @@ -435,7 +434,7 @@ bool System::IsPoweredOn() const { | |||
| 435 | } | 434 | } |
| 436 | 435 | ||
| 437 | void System::PrepareReschedule() { | 436 | void System::PrepareReschedule() { |
| 438 | //impl->CurrentPhysicalCore().Stop(); | 437 | // impl->CurrentPhysicalCore().Stop(); |
| 439 | } | 438 | } |
| 440 | 439 | ||
| 441 | void System::PrepareReschedule(const u32 core_index) { | 440 | 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 @@ | |||
| 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" | ||
| 13 | #include "core/gdbstub/gdbstub.h" | 12 | #include "core/gdbstub/gdbstub.h" |
| 14 | #include "core/hle/kernel/kernel.h" | 13 | #include "core/hle/kernel/kernel.h" |
| 15 | #include "core/hle/kernel/physical_core.h" | 14 | #include "core/hle/kernel/physical_core.h" |
| 16 | #include "core/hle/kernel/scheduler.h" | 15 | #include "core/hle/kernel/scheduler.h" |
| 17 | #include "core/hle/kernel/thread.h" | 16 | #include "core/hle/kernel/thread.h" |
| 17 | #include "video_core/gpu.h" | ||
| 18 | 18 | ||
| 19 | namespace Core { | 19 | namespace Core { |
| 20 | 20 | ||
| @@ -25,10 +25,6 @@ void CpuManager::ThreadStart(CpuManager& cpu_manager, std::size_t core) { | |||
| 25 | cpu_manager.RunThread(core); | 25 | cpu_manager.RunThread(core); |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | void CpuManager::SetRenderWindow(Core::Frontend::EmuWindow& render_window) { | ||
| 29 | this->render_window = &render_window; | ||
| 30 | } | ||
| 31 | |||
| 32 | void CpuManager::Initialize() { | 28 | void CpuManager::Initialize() { |
| 33 | running_mode = true; | 29 | running_mode = true; |
| 34 | if (is_multicore) { | 30 | if (is_multicore) { |
| @@ -354,7 +350,7 @@ void CpuManager::RunThread(std::size_t core) { | |||
| 354 | data.is_running = false; | 350 | data.is_running = false; |
| 355 | data.enter_barrier->Wait(); | 351 | data.enter_barrier->Wait(); |
| 356 | if (sc_sync_first_use) { | 352 | if (sc_sync_first_use) { |
| 357 | render_window->MakeCurrent(); | 353 | system.GPU().ObtainContext(); |
| 358 | sc_sync_first_use = false; | 354 | sc_sync_first_use = false; |
| 359 | } | 355 | } |
| 360 | auto& scheduler = system.Kernel().CurrentScheduler(); | 356 | auto& scheduler = system.Kernel().CurrentScheduler(); |
| @@ -366,9 +362,6 @@ void CpuManager::RunThread(std::size_t core) { | |||
| 366 | data.exit_barrier->Wait(); | 362 | data.exit_barrier->Wait(); |
| 367 | data.is_paused = false; | 363 | data.is_paused = false; |
| 368 | } | 364 | } |
| 369 | if (sc_sync) { | ||
| 370 | render_window->DoneCurrent(); | ||
| 371 | } | ||
| 372 | /// Time to cleanup | 365 | /// Time to cleanup |
| 373 | data.host_context->Exit(); | 366 | data.host_context->Exit(); |
| 374 | data.enter_barrier.reset(); | 367 | 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; | |||
| 16 | class Fiber; | 16 | class Fiber; |
| 17 | } // namespace Common | 17 | } // namespace Common |
| 18 | 18 | ||
| 19 | namespace Core::Frontend { | ||
| 20 | class EmuWindow; | ||
| 21 | } // namespace Core::Frontend | ||
| 22 | |||
| 23 | namespace Core { | 19 | namespace Core { |
| 24 | 20 | ||
| 25 | class System; | 21 | class System; |
| @@ -61,8 +57,6 @@ public: | |||
| 61 | return current_core.load(); | 57 | return current_core.load(); |
| 62 | } | 58 | } |
| 63 | 59 | ||
| 64 | void SetRenderWindow(Core::Frontend::EmuWindow& render_window); | ||
| 65 | |||
| 66 | private: | 60 | private: |
| 67 | static void GuestThreadFunction(void* cpu_manager); | 61 | static void GuestThreadFunction(void* cpu_manager); |
| 68 | static void GuestRewindFunction(void* cpu_manager); | 62 | static void GuestRewindFunction(void* cpu_manager); |
| @@ -106,7 +100,6 @@ private: | |||
| 106 | std::size_t preemption_count{}; | 100 | std::size_t preemption_count{}; |
| 107 | std::size_t idle_count{}; | 101 | std::size_t idle_count{}; |
| 108 | static constexpr std::size_t max_cycle_runs = 5; | 102 | static constexpr std::size_t max_cycle_runs = 5; |
| 109 | Core::Frontend::EmuWindow* render_window; | ||
| 110 | 103 | ||
| 111 | System& system; | 104 | System& system; |
| 112 | }; | 105 | }; |