core: hid: Enable pulling color data from controllers
This commit is contained in:
parent
a4074001fe
commit
ed5fa10e97
9 changed files with 246 additions and 2 deletions
|
@ -335,7 +335,16 @@ void Joycons::OnBatteryUpdate(std::size_t port, Joycon::ControllerType type,
|
|||
}
|
||||
|
||||
void Joycons::OnColorUpdate(std::size_t port, Joycon::ControllerType type,
|
||||
const Joycon::Color& value) {}
|
||||
const Joycon::Color& value) {
|
||||
const auto identifier = GetIdentifier(port, type);
|
||||
Common::Input::BodyColorStatus color{
|
||||
.body = value.body,
|
||||
.buttons = value.buttons,
|
||||
.left_grip = value.left_grip,
|
||||
.right_grip = value.right_grip,
|
||||
};
|
||||
SetColor(identifier, color);
|
||||
}
|
||||
|
||||
void Joycons::OnButtonUpdate(std::size_t port, Joycon::ControllerType type, int id, bool value) {
|
||||
const auto identifier = GetIdentifier(port, type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue