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
|
@ -304,6 +304,20 @@ Common::Input::NfcStatus TransformToNfc(const Common::Input::CallbackStatus& cal
|
|||
return nfc;
|
||||
}
|
||||
|
||||
Common::Input::BodyColorStatus TransformToColor(const Common::Input::CallbackStatus& callback) {
|
||||
Common::Input::BodyColorStatus color{};
|
||||
switch (callback.type) {
|
||||
case Common::Input::InputType::Color:
|
||||
color = callback.color_status;
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR(Input, "Conversion from type {} to color not implemented", callback.type);
|
||||
break;
|
||||
}
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
void SanitizeAnalog(Common::Input::AnalogStatus& analog, bool clamp_value) {
|
||||
const auto& properties = analog.properties;
|
||||
float& raw_value = analog.raw_value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue