summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-19 07:12:24 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:24 +0100
commit601ac43495904f3f7666d79a800a8b4eda5a8461 (patch)
tree97e49cb22264ceb730ce51babbd3c2dc27d6b36f /src/core/hle/service/hid/controllers
parenthid: Fix controller connection/disconnection (diff)
downloadyuzu-601ac43495904f3f7666d79a800a8b4eda5a8461.tar
yuzu-601ac43495904f3f7666d79a800a8b4eda5a8461.tar.gz
yuzu-601ac43495904f3f7666d79a800a8b4eda5a8461.tar.bz2
yuzu-601ac43495904f3f7666d79a800a8b4eda5a8461.tar.lz
yuzu-601ac43495904f3f7666d79a800a8b4eda5a8461.tar.xz
yuzu-601ac43495904f3f7666d79a800a8b4eda5a8461.tar.zst
yuzu-601ac43495904f3f7666d79a800a8b4eda5a8461.zip
Diffstat (limited to 'src/core/hle/service/hid/controllers')
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index 144abab65..6b9d6d11c 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -104,7 +104,10 @@ Controller_NPad::Controller_NPad(Core::System& system_,
controller.vibration[0].latest_vibration_value = DEFAULT_VIBRATION_VALUE;
controller.vibration[1].latest_vibration_value = DEFAULT_VIBRATION_VALUE;
Core::HID::ControllerUpdateCallback engine_callback{
- [this, i](Core::HID::ControllerTriggerType type) { ControllerUpdate(type, i); }};
+ .on_change = [this,
+ i](Core::HID::ControllerTriggerType type) { ControllerUpdate(type, i); },
+ .is_service = true,
+ };
controller.callback_key = controller.device->SetCallback(engine_callback);
}
}
@@ -283,7 +286,6 @@ void Controller_NPad::OnInit() {
// Prefill controller buffers
for (auto& controller : controller_data) {
- NPadGenericState dummy_pad_state{};
auto& npad = controller.shared_memory_entry;
for (std::size_t i = 0; i < 19; ++i) {
WriteEmptyEntry(npad);