summaryrefslogtreecommitdiff
path: root/src/core/memory
diff options
context:
space:
mode:
authorGravatar liamwhite2023-03-01 10:38:20 -0500
committerGravatar GitHub2023-03-01 10:38:20 -0500
commit97f7a560f3905a1dd6a4e5a0a308ea752004bf08 (patch)
treee60a69f96d16d051220b66e90906a7abeacf1064 /src/core/memory
parentMerge pull request #9879 from zhaobot/tx-update-20230301024940 (diff)
parentsm:: fix lingering session initialization issues (diff)
downloadyuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.gz
yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.xz
yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.zip
Merge pull request #9832 from liamwhite/hle-mp
service: HLE multiprocess
Diffstat (limited to 'src/core/memory')
-rw-r--r--src/core/memory/cheat_engine.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp
index 44ee39648..c2d96bbec 100644
--- a/src/core/memory/cheat_engine.cpp
+++ b/src/core/memory/cheat_engine.cpp
@@ -47,8 +47,13 @@ void StandardVmCallbacks::MemoryWrite(VAddr address, const void* data, u64 size)
47} 47}
48 48
49u64 StandardVmCallbacks::HidKeysDown() { 49u64 StandardVmCallbacks::HidKeysDown() {
50 const auto applet_resource = 50 const auto hid = system.ServiceManager().GetService<Service::HID::Hid>("hid");
51 system.ServiceManager().GetService<Service::HID::Hid>("hid")->GetAppletResource(); 51 if (hid == nullptr) {
52 LOG_WARNING(CheatEngine, "Attempted to read input state, but hid is not initialized!");
53 return 0;
54 }
55
56 const auto applet_resource = hid->GetAppletResource();
52 if (applet_resource == nullptr) { 57 if (applet_resource == nullptr) {
53 LOG_WARNING(CheatEngine, 58 LOG_WARNING(CheatEngine,
54 "Attempted to read input state, but applet resource is not initialized!"); 59 "Attempted to read input state, but applet resource is not initialized!");