diff options
| author | Ameer J <52414509+ameerj@users.noreply.github.com> | 2023-11-26 21:08:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-26 21:08:53 -0500 |
| commit | 1d11fe00a3000efbf6a0a4bb690e0d544a1b7b4a (patch) | |
| tree | c219aacab776c0a1e3956614b60a01fa2f6164cb /src/core/memory | |
| parent | 75c5be55af3e0db249cb1bb0c0dd1de6e326849d (diff) | |
| parent | f21340f7aa60296c7b56e293b5f870b7efd3807d (diff) | |
Merge branch 'master' into ssbo-align
Diffstat (limited to 'src/core/memory')
| -rw-r--r-- | src/core/memory/cheat_engine.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp index 53a89cc8f..db30ba598 100644 --- a/src/core/memory/cheat_engine.cpp +++ b/src/core/memory/cheat_engine.cpp @@ -10,7 +10,8 @@ #include "core/hle/kernel/k_page_table.h" #include "core/hle/kernel/k_process.h" #include "core/hle/service/hid/controllers/npad.h" -#include "core/hle/service/hid/hid.h" +#include "core/hle/service/hid/hid_server.h" +#include "core/hle/service/hid/resource_manager.h" #include "core/hle/service/sm/sm.h" #include "core/memory.h" #include "core/memory/cheat_engine.h" @@ -54,23 +55,20 @@ void StandardVmCallbacks::MemoryWrite(VAddr address, const void* data, u64 size) } u64 StandardVmCallbacks::HidKeysDown() { - const auto hid = system.ServiceManager().GetService<Service::HID::Hid>("hid"); + const auto hid = system.ServiceManager().GetService<Service::HID::IHidServer>("hid"); if (hid == nullptr) { LOG_WARNING(CheatEngine, "Attempted to read input state, but hid is not initialized!"); return 0; } - const auto applet_resource = hid->GetAppletResource(); + const auto applet_resource = hid->GetResourceManager(); if (applet_resource == nullptr) { LOG_WARNING(CheatEngine, "Attempted to read input state, but applet resource is not initialized!"); return 0; } - const auto press_state = - applet_resource - ->GetController<Service::HID::Controller_NPad>(Service::HID::HidController::NPad) - .GetAndResetPressState(); + const auto press_state = applet_resource->GetNpad()->GetAndResetPressState(); return static_cast<u64>(press_state & HID::NpadButton::All); } |
