diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-04 08:22:07 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:50 +0200 |
commit | 086db71e942dc3468bccb741cabf62fdd221e790 (patch) | |
tree | 46dda7ba6a9d2a1590b09ddddb450595879b2896 /src/core/hle/service/hid/hid.cpp | |
parent | hle: kernel: Migrate KProcess to KAutoObject. (diff) | |
download | yuzu-086db71e942dc3468bccb741cabf62fdd221e790.tar yuzu-086db71e942dc3468bccb741cabf62fdd221e790.tar.gz yuzu-086db71e942dc3468bccb741cabf62fdd221e790.tar.bz2 yuzu-086db71e942dc3468bccb741cabf62fdd221e790.tar.lz yuzu-086db71e942dc3468bccb741cabf62fdd221e790.tar.xz yuzu-086db71e942dc3468bccb741cabf62fdd221e790.tar.zst yuzu-086db71e942dc3468bccb741cabf62fdd221e790.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index d2a6375f5..49c1db42a 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -53,9 +53,6 @@ IAppletResource::IAppletResource(Core::System& system_) }; RegisterHandlers(functions); - auto& kernel = system.Kernel(); - shared_mem = SharedFrom(&kernel.GetHidSharedMem()); - MakeController<Controller_DebugPad>(HidController::DebugPad); MakeController<Controller_Touchscreen>(HidController::Touchscreen); MakeController<Controller_Mouse>(HidController::Mouse); @@ -118,7 +115,7 @@ void IAppletResource::GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) { IPC::ResponseBuilder rb{ctx, 2, 1}; rb.Push(RESULT_SUCCESS); - rb.PushCopyObjects(shared_mem.get()); + rb.PushCopyObjects(&system.Kernel().GetHidSharedMem()); } void IAppletResource::UpdateControllers(std::uintptr_t user_data, @@ -130,7 +127,8 @@ void IAppletResource::UpdateControllers(std::uintptr_t user_data, if (should_reload) { controller->OnLoadInputDevices(); } - controller->OnUpdate(core_timing, shared_mem->GetPointer(), SHARED_MEMORY_SIZE); + controller->OnUpdate(core_timing, system.Kernel().GetHidSharedMem().GetPointer(), + SHARED_MEMORY_SIZE); } // If ns_late is higher than the update rate ignore the delay @@ -145,7 +143,7 @@ void IAppletResource::UpdateMotion(std::uintptr_t user_data, std::chrono::nanose auto& core_timing = system.CoreTiming(); controllers[static_cast<size_t>(HidController::NPad)]->OnMotionUpdate( - core_timing, shared_mem->GetPointer(), SHARED_MEMORY_SIZE); + core_timing, system.Kernel().GetHidSharedMem().GetPointer(), SHARED_MEMORY_SIZE); // If ns_late is higher than the update rate ignore the delay if (ns_late > motion_update_ns) { |