mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
webxr: Update XRInputSource Gamepad handling, FakeXRInputController (#33403)
* Disconnect XRInputSource gamepads on removal Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update Cargo.lock Signed-off-by: Daniel Adams <msub2official@gmail.com> * Comments, adjustments Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
This commit is contained in:
parent
d9be9d6bd4
commit
08a4d751d7
11 changed files with 84 additions and 29 deletions
|
@ -69,6 +69,7 @@ impl XRInputSourceArray {
|
|||
let mut input_sources = self.input_sources.borrow_mut();
|
||||
let global = self.global();
|
||||
let removed = if let Some(i) = input_sources.iter().find(|i| i.id() == id) {
|
||||
i.gamepad().update_connected(false, false);
|
||||
[DomRoot::from_ref(&**i)]
|
||||
} else {
|
||||
return;
|
||||
|
@ -94,6 +95,7 @@ impl XRInputSourceArray {
|
|||
let global = self.global();
|
||||
let root;
|
||||
let removed = if let Some(i) = input_sources.iter().find(|i| i.id() == id) {
|
||||
i.gamepad().update_connected(false, false);
|
||||
root = [DomRoot::from_ref(&**i)];
|
||||
&root as &[_]
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue