aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-19 00:12:24 -0500
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-24 20:30:24 -0600
commit601ac43495904f3f7666d79a800a8b4eda5a8461 (patch)
tree97e49cb22264ceb730ce51babbd3c2dc27d6b36f /src/core/hle/service
parent4d308fd0b4fc8f14754c47811e751bf068b330b8 (diff)
core/hid: Only signal when needed
Diffstat (limited to 'src/core/hle/service')
-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);