diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/memory/cheat_engine.cpp | 9 |
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 | ||
| 49 | u64 StandardVmCallbacks::HidKeysDown() { | 49 | u64 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!"); |