diff options
| author | 2019-05-30 19:36:18 -0400 | |
|---|---|---|
| committer | 2019-09-21 21:45:05 -0400 | |
| commit | 37850eeee57adfb5318aff7cd19bf9ba334ab738 (patch) | |
| tree | 06668d4787e7b75043da4f83cffbdf35ac892b02 /src/core/core.cpp | |
| parent | patch_manager: Update cheat parsing for new VM (diff) | |
| download | yuzu-37850eeee57adfb5318aff7cd19bf9ba334ab738.tar.gz yuzu-37850eeee57adfb5318aff7cd19bf9ba334ab738.tar.xz yuzu-37850eeee57adfb5318aff7cd19bf9ba334ab738.zip | |
core: Update RegisterCheatList for new VM
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index f22244cf7..67ec8d4b9 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | #include "core/hle/service/service.h" | 37 | #include "core/hle/service/service.h" |
| 38 | #include "core/hle/service/sm/sm.h" | 38 | #include "core/hle/service/sm/sm.h" |
| 39 | #include "core/loader/loader.h" | 39 | #include "core/loader/loader.h" |
| 40 | #include "core/memory/cheat_engine.h" | ||
| 40 | #include "core/perf_stats.h" | 41 | #include "core/perf_stats.h" |
| 41 | #include "core/reporter.h" | 42 | #include "core/reporter.h" |
| 42 | #include "core/settings.h" | 43 | #include "core/settings.h" |
| @@ -329,7 +330,7 @@ struct System::Impl { | |||
| 329 | CpuCoreManager cpu_core_manager; | 330 | CpuCoreManager cpu_core_manager; |
| 330 | bool is_powered_on = false; | 331 | bool is_powered_on = false; |
| 331 | 332 | ||
| 332 | std::unique_ptr<FileSys::CheatEngine> cheat_engine; | 333 | std::unique_ptr<Memory::CheatEngine> cheat_engine; |
| 333 | std::unique_ptr<Tools::Freezer> memory_freezer; | 334 | std::unique_ptr<Tools::Freezer> memory_freezer; |
| 334 | 335 | ||
| 335 | /// Frontend applets | 336 | /// Frontend applets |
| @@ -544,13 +545,6 @@ Tegra::DebugContext* System::GetGPUDebugContext() const { | |||
| 544 | return impl->debug_context.get(); | 545 | return impl->debug_context.get(); |
| 545 | } | 546 | } |
| 546 | 547 | ||
| 547 | void System::RegisterCheatList(const std::vector<FileSys::CheatList>& list, | ||
| 548 | const std::string& build_id, VAddr code_region_start, | ||
| 549 | VAddr code_region_end) { | ||
| 550 | impl->cheat_engine = std::make_unique<FileSys::CheatEngine>(*this, list, build_id, | ||
| 551 | code_region_start, code_region_end); | ||
| 552 | } | ||
| 553 | |||
| 554 | void System::SetFilesystem(std::shared_ptr<FileSys::VfsFilesystem> vfs) { | 548 | void System::SetFilesystem(std::shared_ptr<FileSys::VfsFilesystem> vfs) { |
| 555 | impl->virtual_filesystem = std::move(vfs); | 549 | impl->virtual_filesystem = std::move(vfs); |
| 556 | } | 550 | } |
| @@ -559,6 +553,13 @@ std::shared_ptr<FileSys::VfsFilesystem> System::GetFilesystem() const { | |||
| 559 | return impl->virtual_filesystem; | 553 | return impl->virtual_filesystem; |
| 560 | } | 554 | } |
| 561 | 555 | ||
| 556 | void System::RegisterCheatList(const std::vector<Memory::CheatEntry>& list, | ||
| 557 | const std::array<u8, 32>& build_id, VAddr main_region_begin, | ||
| 558 | u64 main_region_size) { | ||
| 559 | impl->cheat_engine = std::make_unique<Memory::CheatEngine>(*this, list, build_id); | ||
| 560 | impl->cheat_engine->SetMainMemoryParameters(main_region_begin, main_region_size); | ||
| 561 | } | ||
| 562 | |||
| 562 | void System::SetAppletFrontendSet(Service::AM::Applets::AppletFrontendSet&& set) { | 563 | void System::SetAppletFrontendSet(Service::AM::Applets::AppletFrontendSet&& set) { |
| 563 | impl->applet_manager.SetAppletFrontendSet(std::move(set)); | 564 | impl->applet_manager.SetAppletFrontendSet(std::move(set)); |
| 564 | } | 565 | } |