diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/core.cpp | 17 | ||||
| -rw-r--r-- | src/core/core.h | 10 |
2 files changed, 16 insertions, 11 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 | } |
diff --git a/src/core/core.h b/src/core/core.h index bb2962fdd..d2a3c82d8 100644 --- a/src/core/core.h +++ b/src/core/core.h | |||
| @@ -18,7 +18,6 @@ class EmuWindow; | |||
| 18 | } // namespace Core::Frontend | 18 | } // namespace Core::Frontend |
| 19 | 19 | ||
| 20 | namespace FileSys { | 20 | namespace FileSys { |
| 21 | class CheatList; | ||
| 22 | class ContentProvider; | 21 | class ContentProvider; |
| 23 | class ContentProviderUnion; | 22 | class ContentProviderUnion; |
| 24 | enum class ContentProviderUnionSlot; | 23 | enum class ContentProviderUnionSlot; |
| @@ -36,6 +35,10 @@ class AppLoader; | |||
| 36 | enum class ResultStatus : u16; | 35 | enum class ResultStatus : u16; |
| 37 | } // namespace Loader | 36 | } // namespace Loader |
| 38 | 37 | ||
| 38 | namespace Memory { | ||
| 39 | struct CheatEntry; | ||
| 40 | } // namespace Memory | ||
| 41 | |||
| 39 | namespace Service { | 42 | namespace Service { |
| 40 | 43 | ||
| 41 | namespace AM::Applets { | 44 | namespace AM::Applets { |
| @@ -286,8 +289,9 @@ public: | |||
| 286 | 289 | ||
| 287 | std::shared_ptr<FileSys::VfsFilesystem> GetFilesystem() const; | 290 | std::shared_ptr<FileSys::VfsFilesystem> GetFilesystem() const; |
| 288 | 291 | ||
| 289 | void RegisterCheatList(const std::vector<FileSys::CheatList>& list, const std::string& build_id, | 292 | void RegisterCheatList(const std::vector<Memory::CheatEntry>& list, |
| 290 | VAddr code_region_start, VAddr code_region_end); | 293 | const std::array<u8, 0x20>& build_id, VAddr main_region_begin, |
| 294 | u64 main_region_size); | ||
| 291 | 295 | ||
| 292 | void SetAppletFrontendSet(Service::AM::Applets::AppletFrontendSet&& set); | 296 | void SetAppletFrontendSet(Service::AM::Applets::AppletFrontendSet&& set); |
| 293 | 297 | ||