From 70535466877748ed765c11170c573767f61bd744 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Sat, 22 Dec 2018 21:32:05 -0500 Subject: core: Add support for registering and controlling ownership of CheatEngine --- src/core/core.cpp | 9 +++++++++ src/core/core.h | 4 ++++ 2 files changed, 13 insertions(+) (limited to 'src/core') diff --git a/src/core/core.cpp b/src/core/core.cpp index ab7181a05..ce53ef758 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -32,6 +32,7 @@ #include "core/perf_stats.h" #include "core/settings.h" #include "core/telemetry_session.h" +#include "file_sys/cheat_engine.h" #include "frontend/applets/profile_select.h" #include "frontend/applets/software_keyboard.h" #include "frontend/applets/web_browser.h" @@ -197,6 +198,7 @@ struct System::Impl { GDBStub::Shutdown(); Service::Shutdown(); service_manager.reset(); + cheat_engine.reset(); telemetry_session.reset(); gpu_core.reset(); @@ -247,6 +249,8 @@ struct System::Impl { CpuCoreManager cpu_core_manager; bool is_powered_on = false; + std::unique_ptr cheat_engine; + /// Frontend applets std::unique_ptr profile_selector; std::unique_ptr software_keyboard; @@ -445,6 +449,11 @@ Tegra::DebugContext* System::GetGPUDebugContext() const { return impl->debug_context.get(); } +void System::RegisterCheatList(const std::vector& list, + const std::string& build_id) { + impl->cheat_engine = std::make_unique(list, build_id); +} + void System::SetFilesystem(std::shared_ptr vfs) { impl->virtual_filesystem = std::move(vfs); } diff --git a/src/core/core.h b/src/core/core.h index d720013f7..bfb75631e 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -20,6 +20,7 @@ class WebBrowserApplet; } // namespace Core::Frontend namespace FileSys { +class CheatList; class VfsFilesystem; } // namespace FileSys @@ -253,6 +254,9 @@ public: std::shared_ptr GetFilesystem() const; + void RegisterCheatList(const std::vector& list, + const std::string& build_id); + void SetProfileSelector(std::unique_ptr applet); const Frontend::ProfileSelectApplet& GetProfileSelector() const; -- cgit v1.2.3