diff options
author | yuzubot <[email protected]> | 2024-03-04 13:02:54 +0000 |
---|---|---|
committer | yuzubot <[email protected]> | 2024-03-04 13:02:54 +0000 |
commit | 537296095ab24eddcb196b5ef98004f91de9c8c2 (patch) | |
tree | e75e9e2441dc3f8657cc42f2daaae08737949c2b /src/core/hle/service/am/hid_registration.cpp | |
parent | 2ddac7b02b660bbc7bdfe4fef240699df6d52e64 (diff) | |
download | yuzu-mainline-master.tar.gz yuzu-mainline-master.zip |
Diffstat (limited to 'src/core/hle/service/am/hid_registration.cpp')
-rw-r--r-- | src/core/hle/service/am/hid_registration.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/hle/service/am/hid_registration.cpp b/src/core/hle/service/am/hid_registration.cpp index 8ed49bac1..ea4bd8f45 100644 --- a/src/core/hle/service/am/hid_registration.cpp +++ b/src/core/hle/service/am/hid_registration.cpp @@ -3,24 +3,28 @@ #include "core/core.h" #include "core/hle/service/am/hid_registration.h" -#include "core/hle/service/am/process.h" #include "core/hle/service/hid/hid_server.h" +#include "core/hle/service/os/process.h" #include "core/hle/service/sm/sm.h" #include "hid_core/resource_manager.h" namespace Service::AM { HidRegistration::HidRegistration(Core::System& system, Process& process) : m_process(process) { - m_hid_server = system.ServiceManager().GetService<HID::IHidServer>("hid"); + m_hid_server = system.ServiceManager().GetService<HID::IHidServer>("hid", true); if (m_process.IsInitialized()) { m_hid_server->GetResourceManager()->RegisterAppletResourceUserId(m_process.GetProcessId(), true); + m_hid_server->GetResourceManager()->SetAruidValidForVibration(m_process.GetProcessId(), + true); } } HidRegistration::~HidRegistration() { if (m_process.IsInitialized()) { + m_hid_server->GetResourceManager()->SetAruidValidForVibration(m_process.GetProcessId(), + false); m_hid_server->GetResourceManager()->UnregisterAppletResourceUserId( m_process.GetProcessId()); } @@ -28,6 +32,8 @@ HidRegistration::~HidRegistration() { void HidRegistration::EnableAppletToGetInput(bool enable) { if (m_process.IsInitialized()) { + m_hid_server->GetResourceManager()->SetAruidValidForVibration(m_process.GetProcessId(), + enable); m_hid_server->GetResourceManager()->EnableInput(m_process.GetProcessId(), enable); } } |