diff options
Diffstat (limited to 'src/core/hle/service/hid/hidbus.cpp')
-rw-r--r-- | src/core/hle/service/hid/hidbus.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/hle/service/hid/hidbus.cpp b/src/core/hle/service/hid/hidbus.cpp index 80aac221b..ffa7e144d 100644 --- a/src/core/hle/service/hid/hidbus.cpp +++ b/src/core/hle/service/hid/hidbus.cpp @@ -49,10 +49,10 @@ HidBus::HidBus(Core::System& system_) // Register update callbacks hidbus_update_event = Core::Timing::CreateEvent( "Hidbus::UpdateCallback", - [this](std::uintptr_t user_data, s64 time, + [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional<std::chrono::nanoseconds> { const auto guard = LockService(); - UpdateHidbus(user_data, ns_late); + UpdateHidbus(ns_late); return std::nullopt; }); @@ -61,10 +61,10 @@ HidBus::HidBus(Core::System& system_) } HidBus::~HidBus() { - system.CoreTiming().UnscheduleEvent(hidbus_update_event, 0); + system.CoreTiming().UnscheduleEvent(hidbus_update_event); } -void HidBus::UpdateHidbus(std::uintptr_t user_data, std::chrono::nanoseconds ns_late) { +void HidBus::UpdateHidbus(std::chrono::nanoseconds ns_late) { if (is_hidbus_enabled) { for (std::size_t i = 0; i < devices.size(); ++i) { if (!devices[i].is_device_initializated) { @@ -448,8 +448,7 @@ void HidBus::EnableJoyPollingReceiveMode(HLERequestContext& ctx) { ASSERT_MSG(t_mem_size == 0x1000, "t_mem_size is not 0x1000 bytes"); - auto t_mem = system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>( - t_mem_handle); + auto t_mem = ctx.GetObjectFromHandle<Kernel::KTransferMemory>(t_mem_handle); if (t_mem.IsNull()) { LOG_ERROR(Service_HID, "t_mem is a nullptr for handle=0x{:08X}", t_mem_handle); |