mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
cheat_engine: add check for hid initialization
This commit is contained in:
parent
6e0a33089b
commit
87749d217e
1 changed files with 7 additions and 2 deletions
|
@ -47,8 +47,13 @@ void StandardVmCallbacks::MemoryWrite(VAddr address, const void* data, u64 size)
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 StandardVmCallbacks::HidKeysDown() {
|
u64 StandardVmCallbacks::HidKeysDown() {
|
||||||
const auto applet_resource =
|
const auto hid = system.ServiceManager().GetService<Service::HID::Hid>("hid");
|
||||||
system.ServiceManager().GetService<Service::HID::Hid>("hid")->GetAppletResource();
|
if (hid == nullptr) {
|
||||||
|
LOG_WARNING(CheatEngine, "Attempted to read input state, but hid is not initialized!");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto applet_resource = hid->GetAppletResource();
|
||||||
if (applet_resource == nullptr) {
|
if (applet_resource == nullptr) {
|
||||||
LOG_WARNING(CheatEngine,
|
LOG_WARNING(CheatEngine,
|
||||||
"Attempted to read input state, but applet resource is not initialized!");
|
"Attempted to read input state, but applet resource is not initialized!");
|
||||||
|
|
Loading…
Reference in a new issue