diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-10 11:34:26 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:51 +0200 |
commit | 2e8d6fe9a0c07538397682e1cb25992bfd15676d (patch) | |
tree | 444ee462a197818e0114150a03c0a5898cadaa19 /src/core/hle/service/hid | |
parent | hle: ipc_helpers: Add methods for copy/move references. (diff) | |
download | yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.gz yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.bz2 yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.lz yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.xz yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.zst yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.zip |
Diffstat (limited to 'src/core/hle/service/hid')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.cpp | 9 | ||||
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index 77768ca7d..7acad3798 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -159,7 +159,7 @@ void Controller_NPad::InitNewlyAddedController(std::size_t controller_idx) { const auto controller_type = connected_controllers[controller_idx].type; auto& controller = shared_memory_entries[controller_idx]; if (controller_type == NPadControllerType::None) { - styleset_changed_events[controller_idx]->GetWritableEvent()->Signal(); + styleset_changed_events[controller_idx]->GetWritableEvent().Signal(); return; } controller.style_set.raw = 0; // Zero out @@ -959,13 +959,12 @@ bool Controller_NPad::IsVibrationDeviceMounted(const DeviceHandle& vibration_dev return vibration_devices_mounted[npad_index][device_index]; } -Kernel::KReadableEvent* Controller_NPad::GetStyleSetChangedEvent(u32 npad_id) const { - const auto& styleset_event = styleset_changed_events[NPadIdToIndex(npad_id)]; - return styleset_event->GetReadableEvent(); +Kernel::KReadableEvent& Controller_NPad::GetStyleSetChangedEvent(u32 npad_id) { + return styleset_changed_events[NPadIdToIndex(npad_id)]->GetReadableEvent(); } void Controller_NPad::SignalStyleSetChangedEvent(u32 npad_id) const { - styleset_changed_events[NPadIdToIndex(npad_id)]->GetWritableEvent()->Signal(); + styleset_changed_events[NPadIdToIndex(npad_id)]->GetWritableEvent().Signal(); } void Controller_NPad::AddNewControllerAt(NPadControllerType controller, std::size_t npad_index) { diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h index b3de272b6..b0f575561 100644 --- a/src/core/hle/service/hid/controllers/npad.h +++ b/src/core/hle/service/hid/controllers/npad.h @@ -199,7 +199,7 @@ public: bool IsVibrationDeviceMounted(const DeviceHandle& vibration_device_handle) const; - Kernel::KReadableEvent* GetStyleSetChangedEvent(u32 npad_id) const; + Kernel::KReadableEvent& GetStyleSetChangedEvent(u32 npad_id); void SignalStyleSetChangedEvent(u32 npad_id) const; // Adds a new controller at an index. |