mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-14 16:57:59 -05:00
core: hid: Enable pulling color data from controllers
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user