diff options
| author | 2019-11-28 11:43:17 -0500 | |
|---|---|---|
| committer | 2019-11-28 11:43:17 -0500 | |
| commit | e3ee017e91ef4d713f1af8cb60c5157e40d43f18 (patch) | |
| tree | e0a5b47cac1d548599b8ceba7f71b40746fe6b48 /src/core/core.cpp | |
| parent | Merge pull request #3171 from lioncash/internal-link (diff) | |
| parent | core/memory; Migrate over SetCurrentPageTable() to the Memory class (diff) | |
| download | yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.gz yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.xz yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.zip | |
Merge pull request #3169 from lioncash/memory
core/memory: Deglobalize memory management code
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index eba17218a..c45fb960c 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | #include "core/hle/service/service.h" | 39 | #include "core/hle/service/service.h" |
| 40 | #include "core/hle/service/sm/sm.h" | 40 | #include "core/hle/service/sm/sm.h" |
| 41 | #include "core/loader/loader.h" | 41 | #include "core/loader/loader.h" |
| 42 | #include "core/memory.h" | ||
| 42 | #include "core/memory/cheat_engine.h" | 43 | #include "core/memory/cheat_engine.h" |
| 43 | #include "core/perf_stats.h" | 44 | #include "core/perf_stats.h" |
| 44 | #include "core/reporter.h" | 45 | #include "core/reporter.h" |
| @@ -112,8 +113,8 @@ FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs, | |||
| 112 | } | 113 | } |
| 113 | struct System::Impl { | 114 | struct System::Impl { |
| 114 | explicit Impl(System& system) | 115 | explicit Impl(System& system) |
| 115 | : kernel{system}, fs_controller{system}, cpu_core_manager{system}, reporter{system}, | 116 | : kernel{system}, fs_controller{system}, memory{system}, |
| 116 | applet_manager{system} {} | 117 | cpu_core_manager{system}, reporter{system}, applet_manager{system} {} |
| 117 | 118 | ||
| 118 | Cpu& CurrentCpuCore() { | 119 | Cpu& CurrentCpuCore() { |
| 119 | return cpu_core_manager.GetCurrentCore(); | 120 | return cpu_core_manager.GetCurrentCore(); |
| @@ -341,7 +342,8 @@ struct System::Impl { | |||
| 341 | std::unique_ptr<VideoCore::RendererBase> renderer; | 342 | std::unique_ptr<VideoCore::RendererBase> renderer; |
| 342 | std::unique_ptr<Tegra::GPU> gpu_core; | 343 | std::unique_ptr<Tegra::GPU> gpu_core; |
| 343 | std::shared_ptr<Tegra::DebugContext> debug_context; | 344 | std::shared_ptr<Tegra::DebugContext> debug_context; |
| 344 | std::unique_ptr<Core::Hardware::InterruptManager> interrupt_manager; | 345 | std::unique_ptr<Hardware::InterruptManager> interrupt_manager; |
| 346 | Memory::Memory memory; | ||
| 345 | CpuCoreManager cpu_core_manager; | 347 | CpuCoreManager cpu_core_manager; |
| 346 | bool is_powered_on = false; | 348 | bool is_powered_on = false; |
| 347 | bool exit_lock = false; | 349 | bool exit_lock = false; |
| @@ -498,6 +500,14 @@ const ExclusiveMonitor& System::Monitor() const { | |||
| 498 | return impl->cpu_core_manager.GetExclusiveMonitor(); | 500 | return impl->cpu_core_manager.GetExclusiveMonitor(); |
| 499 | } | 501 | } |
| 500 | 502 | ||
| 503 | Memory::Memory& System::Memory() { | ||
| 504 | return impl->memory; | ||
| 505 | } | ||
| 506 | |||
| 507 | const Memory::Memory& System::Memory() const { | ||
| 508 | return impl->memory; | ||
| 509 | } | ||
| 510 | |||
| 501 | Tegra::GPU& System::GPU() { | 511 | Tegra::GPU& System::GPU() { |
| 502 | return *impl->gpu_core; | 512 | return *impl->gpu_core; |
| 503 | } | 513 | } |