mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update to latest xrtest api
This commit is contained in:
parent
faea7716cf
commit
c19240a454
17 changed files with 269 additions and 190 deletions
|
@ -22,8 +22,8 @@ gleam = "0.6"
|
|||
ipc-channel = "0.11.2"
|
||||
log = "0.4"
|
||||
msg = {path = "../msg"}
|
||||
rust-webvr = {version = "0.12", features = ["mock", "openvr", "vrexternal"]}
|
||||
rust-webvr-api = "0.12"
|
||||
rust-webvr = {version = "0.13", features = ["mock", "openvr", "vrexternal"]}
|
||||
rust-webvr-api = "0.13"
|
||||
script_traits = {path = "../script_traits"}
|
||||
servo_config = {path = "../config"}
|
||||
webvr_traits = {path = "../webvr_traits" }
|
||||
|
|
|
@ -135,8 +135,8 @@ impl WebVRThread {
|
|||
self.handle_get_gamepads_for_display(display_id, sender);
|
||||
},
|
||||
|
||||
WebVRMsg::CreateMockDisplay => {
|
||||
self.handle_create_mock();
|
||||
WebVRMsg::CreateMockDisplay(init) => {
|
||||
self.handle_create_mock(init);
|
||||
},
|
||||
WebVRMsg::MessageMockDisplay(msg) => {
|
||||
self.handle_message_mock_display(msg);
|
||||
|
@ -312,12 +312,12 @@ impl WebVRThread {
|
|||
sender.send(Ok(data)).unwrap();
|
||||
}
|
||||
|
||||
fn handle_create_mock(&mut self) {
|
||||
fn handle_create_mock(&mut self, init: MockVRInit) {
|
||||
if self.mock.is_some() {
|
||||
warn!("Mock display already created");
|
||||
return;
|
||||
}
|
||||
self.mock = Some(self.service.register_mock_with_remote());
|
||||
self.mock = Some(self.service.register_mock_with_remote(init));
|
||||
}
|
||||
|
||||
fn handle_message_mock_display(&mut self, msg: MockVRControlMsg) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue