summaryrefslogtreecommitdiff
path: root/src/input_common/drivers/joycon.cpp
diff options
context:
space:
mode:
authorGravatar Narr the Reg2022-12-20 13:23:31 -0600
committerGravatar Narr the Reg2023-01-19 18:05:20 -0600
commited5fa10e9729cf55205533f62a428e646aa5ed7c (patch)
treefe1fa3882df8a26845f937dbb0a51beb7ac7acc3 /src/input_common/drivers/joycon.cpp
parentcore: hid: Migrate ring from emulated devices to emulated controller (diff)
downloadyuzu-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.cpp11
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
337void Joycons::OnColorUpdate(std::size_t port, Joycon::ControllerType type, 337void 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
340void Joycons::OnButtonUpdate(std::size_t port, Joycon::ControllerType type, int id, bool value) { 349void 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);