summaryrefslogtreecommitdiffstats
path: root/src/core/memory/cheat_engine.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-02-09 17:47:34 +0100
committerGitHub <noreply@github.com>2024-02-09 17:47:34 +0100
commita133eadf0679ba55615d13cf2dfc3df5b1ea6f4b (patch)
tree661c419d5705c3f7f023fe4a5310a9e6d112047b /src/core/memory/cheat_engine.cpp
parentMerge pull request #12968 from t895/thermal-status (diff)
parentdmnt: cheat: Add pause and resume support (diff)
downloadyuzu-a133eadf0679ba55615d13cf2dfc3df5b1ea6f4b.tar
yuzu-a133eadf0679ba55615d13cf2dfc3df5b1ea6f4b.tar.gz
yuzu-a133eadf0679ba55615d13cf2dfc3df5b1ea6f4b.tar.bz2
yuzu-a133eadf0679ba55615d13cf2dfc3df5b1ea6f4b.tar.lz
yuzu-a133eadf0679ba55615d13cf2dfc3df5b1ea6f4b.tar.xz
yuzu-a133eadf0679ba55615d13cf2dfc3df5b1ea6f4b.tar.zst
yuzu-a133eadf0679ba55615d13cf2dfc3df5b1ea6f4b.zip
Diffstat (limited to 'src/core/memory/cheat_engine.cpp')
-rw-r--r--src/core/memory/cheat_engine.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp
index 470521f44..b84b57d92 100644
--- a/src/core/memory/cheat_engine.cpp
+++ b/src/core/memory/cheat_engine.cpp
@@ -11,6 +11,7 @@
#include "core/hle/kernel/k_page_table.h"
#include "core/hle/kernel/k_process.h"
#include "core/hle/kernel/k_process_page_table.h"
+#include "core/hle/kernel/svc_types.h"
#include "core/hle/service/hid/hid_server.h"
#include "core/hle/service/sm/sm.h"
#include "core/memory.h"
@@ -87,6 +88,20 @@ u64 StandardVmCallbacks::HidKeysDown() {
return static_cast<u64>(press_state & HID::NpadButton::All);
}
+void StandardVmCallbacks::PauseProcess() {
+ if (system.ApplicationProcess()->IsSuspended()) {
+ return;
+ }
+ system.ApplicationProcess()->SetActivity(Kernel::Svc::ProcessActivity::Paused);
+}
+
+void StandardVmCallbacks::ResumeProcess() {
+ if (!system.ApplicationProcess()->IsSuspended()) {
+ return;
+ }
+ system.ApplicationProcess()->SetActivity(Kernel::Svc::ProcessActivity::Runnable);
+}
+
void StandardVmCallbacks::DebugLog(u8 id, u64 value) {
LOG_INFO(CheatEngine, "Cheat triggered DebugLog: ID '{:01X}' Value '{:016X}'", id, value);
}