summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-25 06:23:54 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:26 +0100
commit064ddacf49aa7155e26add55983b81fdda997077 (patch)
tree17f6d767233c10578d84d2029014a3dfa4b55396 /src/core/hle
parentinput_common: Add manual update options to input devices (diff)
downloadyuzu-064ddacf49aa7155e26add55983b81fdda997077.tar
yuzu-064ddacf49aa7155e26add55983b81fdda997077.tar.gz
yuzu-064ddacf49aa7155e26add55983b81fdda997077.tar.bz2
yuzu-064ddacf49aa7155e26add55983b81fdda997077.tar.lz
yuzu-064ddacf49aa7155e26add55983b81fdda997077.tar.xz
yuzu-064ddacf49aa7155e26add55983b81fdda997077.tar.zst
yuzu-064ddacf49aa7155e26add55983b81fdda997077.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index 7bf31f63a..9f84e20c2 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -101,8 +101,9 @@ Controller_NPad::Controller_NPad(Core::System& system_,
for (std::size_t i = 0; i < controller_data.size(); ++i) {
auto& controller = controller_data[i];
controller.device = system.HIDCore().GetEmulatedControllerByIndex(i);
- controller.vibration[0].latest_vibration_value = DEFAULT_VIBRATION_VALUE;
- controller.vibration[1].latest_vibration_value = DEFAULT_VIBRATION_VALUE;
+ controller.vibration[Core::HID::DeviceIndex::LeftIndex].latest_vibration_value = DEFAULT_VIBRATION_VALUE;
+ controller.vibration[Core::HID::DeviceIndex::RightIndex].latest_vibration_value =
+ DEFAULT_VIBRATION_VALUE;
Core::HID::ControllerUpdateCallback engine_callback{
.on_change = [this,
i](Core::HID::ControllerTriggerType type) { ControllerUpdate(type, i); },
@@ -285,9 +286,12 @@ void Controller_NPad::OnInit() {
auto& npad = controller.shared_memory_entry;
npad.fullkey_color = {
.attribute = ColorAttribute::NoController,
+ .fullkey = {},
};
npad.joycon_color = {
.attribute = ColorAttribute::NoController,
+ .left = {},
+ .right = {},
};
// HW seems to initialize the first 19 entries
for (std::size_t i = 0; i < 19; ++i) {
@@ -907,9 +911,12 @@ void Controller_NPad::DisconnectNpadAtIndex(std::size_t npad_index) {
shared_memory_entry.battery_level_right = 0;
shared_memory_entry.fullkey_color = {
.attribute = ColorAttribute::NoController,
+ .fullkey = {},
};
shared_memory_entry.joycon_color = {
.attribute = ColorAttribute::NoController,
+ .left = {},
+ .right = {},
};
shared_memory_entry.assignment_mode = NpadJoyAssignmentMode::Dual;
shared_memory_entry.footer_type = AppletFooterUiType::None;