feat: make left and right qwerty controllers appear as no controller detected
Some checks failed
/ cargo-fmtcheck (push) Has been cancelled
/ cargo-clippy (push) Has been cancelled
/ cargo-test (push) Has been cancelled
/ appimage (push) Has been cancelled

This commit is contained in:
Gabriele Musco 2024-12-05 07:54:42 +01:00
parent 92cd8f6a94
commit 9a4ef01ed9

View file

@ -61,9 +61,19 @@ impl SimpleComponent for DevicesBox {
}
if !has_left && dev.roles.contains(&XRDeviceRole::Left) {
has_left = true;
if ["Qwerty Left Controller"].contains(&dev.name.as_str()) {
row_model.state = Some(DeviceRowState::Warning);
row_model.subtitle =
Some(format!("No left controller detected ({})", dev.name));
}
}
if !has_right && dev.roles.contains(&XRDeviceRole::Right) {
has_right = true;
if ["Qwerty Right Controller"].contains(&dev.name.as_str()) {
row_model.state = Some(DeviceRowState::Warning);
row_model.subtitle =
Some(format!("No right controller detected ({})", dev.name));
}
}
models.push(row_model);
}