diff options
| author | 2022-12-20 13:33:45 -0600 | |
|---|---|---|
| committer | 2023-01-19 18:05:20 -0600 | |
| commit | 36d5e0a41151ae39b5fb827c5085142ab4b296a5 (patch) | |
| tree | d9ed364e998725b6b6fb378768466e1adbe8ec44 | |
| parent | core: hid: Enable pulling color data from controllers (diff) | |
| download | yuzu-36d5e0a41151ae39b5fb827c5085142ab4b296a5.tar.gz yuzu-36d5e0a41151ae39b5fb827c5085142ab4b296a5.tar.xz yuzu-36d5e0a41151ae39b5fb827c5085142ab4b296a5.zip | |
service: hid: Set led pattern and fix color detection
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/hid/controllers/npad.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index 2f871de31..83b368091 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp | |||
| @@ -272,6 +272,8 @@ void Controller_NPad::InitNewlyAddedController(Core::HID::NpadIdType npad_id) { | |||
| 272 | } | 272 | } |
| 273 | break; | 273 | break; |
| 274 | case Core::HID::NpadStyleIndex::JoyconLeft: | 274 | case Core::HID::NpadStyleIndex::JoyconLeft: |
| 275 | shared_memory->fullkey_color.attribute = ColorAttribute::Ok; | ||
| 276 | shared_memory->fullkey_color.fullkey = body_colors.left; | ||
| 275 | shared_memory->joycon_color.attribute = ColorAttribute::Ok; | 277 | shared_memory->joycon_color.attribute = ColorAttribute::Ok; |
| 276 | shared_memory->joycon_color.left = body_colors.left; | 278 | shared_memory->joycon_color.left = body_colors.left; |
| 277 | shared_memory->battery_level_dual = battery_level.left.battery_level; | 279 | shared_memory->battery_level_dual = battery_level.left.battery_level; |
| @@ -285,6 +287,8 @@ void Controller_NPad::InitNewlyAddedController(Core::HID::NpadIdType npad_id) { | |||
| 285 | shared_memory->sixaxis_left_properties.is_newly_assigned.Assign(1); | 287 | shared_memory->sixaxis_left_properties.is_newly_assigned.Assign(1); |
| 286 | break; | 288 | break; |
| 287 | case Core::HID::NpadStyleIndex::JoyconRight: | 289 | case Core::HID::NpadStyleIndex::JoyconRight: |
| 290 | shared_memory->fullkey_color.attribute = ColorAttribute::Ok; | ||
| 291 | shared_memory->fullkey_color.fullkey = body_colors.right; | ||
| 288 | shared_memory->joycon_color.attribute = ColorAttribute::Ok; | 292 | shared_memory->joycon_color.attribute = ColorAttribute::Ok; |
| 289 | shared_memory->joycon_color.right = body_colors.right; | 293 | shared_memory->joycon_color.right = body_colors.right; |
| 290 | shared_memory->battery_level_right = battery_level.right.battery_level; | 294 | shared_memory->battery_level_right = battery_level.right.battery_level; |
| @@ -332,6 +336,7 @@ void Controller_NPad::InitNewlyAddedController(Core::HID::NpadIdType npad_id) { | |||
| 332 | 336 | ||
| 333 | controller.is_connected = true; | 337 | controller.is_connected = true; |
| 334 | controller.device->Connect(); | 338 | controller.device->Connect(); |
| 339 | controller.device->SetLedPattern(); | ||
| 335 | SignalStyleSetChangedEvent(npad_id); | 340 | SignalStyleSetChangedEvent(npad_id); |
| 336 | WriteEmptyEntry(controller.shared_memory); | 341 | WriteEmptyEntry(controller.shared_memory); |
| 337 | } | 342 | } |