diff options
| author | 2022-12-20 13:23:31 -0600 | |
|---|---|---|
| committer | 2023-01-19 18:05:20 -0600 | |
| commit | ed5fa10e9729cf55205533f62a428e646aa5ed7c (patch) | |
| tree | fe1fa3882df8a26845f937dbb0a51beb7ac7acc3 /src/input_common/drivers/joycon.cpp | |
| parent | core: hid: Migrate ring from emulated devices to emulated controller (diff) | |
| download | yuzu-ed5fa10e9729cf55205533f62a428e646aa5ed7c.tar.gz yuzu-ed5fa10e9729cf55205533f62a428e646aa5ed7c.tar.xz yuzu-ed5fa10e9729cf55205533f62a428e646aa5ed7c.zip | |
core: hid: Enable pulling color data from controllers
Diffstat (limited to 'src/input_common/drivers/joycon.cpp')
| -rw-r--r-- | src/input_common/drivers/joycon.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/input_common/drivers/joycon.cpp b/src/input_common/drivers/joycon.cpp index 1fca11d34..c6f78c989 100644 --- a/src/input_common/drivers/joycon.cpp +++ b/src/input_common/drivers/joycon.cpp | |||
| @@ -335,7 +335,16 @@ void Joycons::OnBatteryUpdate(std::size_t port, Joycon::ControllerType type, | |||
| 335 | } | 335 | } |
| 336 | 336 | ||
| 337 | void Joycons::OnColorUpdate(std::size_t port, Joycon::ControllerType type, | 337 | void Joycons::OnColorUpdate(std::size_t port, Joycon::ControllerType type, |
| 338 | const Joycon::Color& value) {} | 338 | const Joycon::Color& value) { |
| 339 | const auto identifier = GetIdentifier(port, type); | ||
| 340 | Common::Input::BodyColorStatus color{ | ||
| 341 | .body = value.body, | ||
| 342 | .buttons = value.buttons, | ||
| 343 | .left_grip = value.left_grip, | ||
| 344 | .right_grip = value.right_grip, | ||
| 345 | }; | ||
| 346 | SetColor(identifier, color); | ||
| 347 | } | ||
| 339 | 348 | ||
| 340 | void Joycons::OnButtonUpdate(std::size_t port, Joycon::ControllerType type, int id, bool value) { | 349 | void Joycons::OnButtonUpdate(std::size_t port, Joycon::ControllerType type, int id, bool value) { |
| 341 | const auto identifier = GetIdentifier(port, type); | 350 | const auto identifier = GetIdentifier(port, type); |