diff options
| author | 2018-12-22 21:32:05 -0500 | |
|---|---|---|
| committer | 2019-03-04 18:41:29 -0500 | |
| commit | 70535466877748ed765c11170c573767f61bd744 (patch) | |
| tree | 956127b47ab9296e9591e256ed9d8c0492102e6a /src | |
| parent | cheat_engine: Add parser and interpreter for game cheats (diff) | |
| download | yuzu-70535466877748ed765c11170c573767f61bd744.tar.gz yuzu-70535466877748ed765c11170c573767f61bd744.tar.xz yuzu-70535466877748ed765c11170c573767f61bd744.zip | |
core: Add support for registering and controlling ownership of CheatEngine
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/core.cpp | 9 | ||||
| -rw-r--r-- | src/core/core.h | 4 |
2 files changed, 13 insertions, 0 deletions
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 @@ | |||
| 32 | #include "core/perf_stats.h" | 32 | #include "core/perf_stats.h" |
| 33 | #include "core/settings.h" | 33 | #include "core/settings.h" |
| 34 | #include "core/telemetry_session.h" | 34 | #include "core/telemetry_session.h" |
| 35 | #include "file_sys/cheat_engine.h" | ||
| 35 | #include "frontend/applets/profile_select.h" | 36 | #include "frontend/applets/profile_select.h" |
| 36 | #include "frontend/applets/software_keyboard.h" | 37 | #include "frontend/applets/software_keyboard.h" |
| 37 | #include "frontend/applets/web_browser.h" | 38 | #include "frontend/applets/web_browser.h" |
| @@ -197,6 +198,7 @@ struct System::Impl { | |||
| 197 | GDBStub::Shutdown(); | 198 | GDBStub::Shutdown(); |
| 198 | Service::Shutdown(); | 199 | Service::Shutdown(); |
| 199 | service_manager.reset(); | 200 | service_manager.reset(); |
| 201 | cheat_engine.reset(); | ||
| 200 | telemetry_session.reset(); | 202 | telemetry_session.reset(); |
| 201 | gpu_core.reset(); | 203 | gpu_core.reset(); |
| 202 | 204 | ||
| @@ -247,6 +249,8 @@ struct System::Impl { | |||
| 247 | CpuCoreManager cpu_core_manager; | 249 | CpuCoreManager cpu_core_manager; |
| 248 | bool is_powered_on = false; | 250 | bool is_powered_on = false; |
| 249 | 251 | ||
| 252 | std::unique_ptr<FileSys::CheatEngine> cheat_engine; | ||
| 253 | |||
| 250 | /// Frontend applets | 254 | /// Frontend applets |
| 251 | std::unique_ptr<Core::Frontend::ProfileSelectApplet> profile_selector; | 255 | std::unique_ptr<Core::Frontend::ProfileSelectApplet> profile_selector; |
| 252 | std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard; | 256 | std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard; |
| @@ -445,6 +449,11 @@ Tegra::DebugContext* System::GetGPUDebugContext() const { | |||
| 445 | return impl->debug_context.get(); | 449 | return impl->debug_context.get(); |
| 446 | } | 450 | } |
| 447 | 451 | ||
| 452 | void System::RegisterCheatList(const std::vector<FileSys::CheatList>& list, | ||
| 453 | const std::string& build_id) { | ||
| 454 | impl->cheat_engine = std::make_unique<FileSys::CheatEngine>(list, build_id); | ||
| 455 | } | ||
| 456 | |||
| 448 | void System::SetFilesystem(std::shared_ptr<FileSys::VfsFilesystem> vfs) { | 457 | void System::SetFilesystem(std::shared_ptr<FileSys::VfsFilesystem> vfs) { |
| 449 | impl->virtual_filesystem = std::move(vfs); | 458 | impl->virtual_filesystem = std::move(vfs); |
| 450 | } | 459 | } |
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; | |||
| 20 | } // namespace Core::Frontend | 20 | } // namespace Core::Frontend |
| 21 | 21 | ||
| 22 | namespace FileSys { | 22 | namespace FileSys { |
| 23 | class CheatList; | ||
| 23 | class VfsFilesystem; | 24 | class VfsFilesystem; |
| 24 | } // namespace FileSys | 25 | } // namespace FileSys |
| 25 | 26 | ||
| @@ -253,6 +254,9 @@ public: | |||
| 253 | 254 | ||
| 254 | std::shared_ptr<FileSys::VfsFilesystem> GetFilesystem() const; | 255 | std::shared_ptr<FileSys::VfsFilesystem> GetFilesystem() const; |
| 255 | 256 | ||
| 257 | void RegisterCheatList(const std::vector<FileSys::CheatList>& list, | ||
| 258 | const std::string& build_id); | ||
| 259 | |||
| 256 | void SetProfileSelector(std::unique_ptr<Frontend::ProfileSelectApplet> applet); | 260 | void SetProfileSelector(std::unique_ptr<Frontend::ProfileSelectApplet> applet); |
| 257 | 261 | ||
| 258 | const Frontend::ProfileSelectApplet& GetProfileSelector() const; | 262 | const Frontend::ProfileSelectApplet& GetProfileSelector() const; |