mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Fixed magicleap Servo2D application
This commit is contained in:
parent
5f4074ada8
commit
b5bd3ad7ea
1 changed files with 11 additions and 6 deletions
|
@ -140,17 +140,22 @@ pub unsafe extern "C" fn init_servo(
|
||||||
};
|
};
|
||||||
info!("got args: {:?}", args);
|
info!("got args: {:?}", args);
|
||||||
|
|
||||||
|
let vr_init = if landscape {
|
||||||
|
VRInitOptions::None
|
||||||
|
} else {
|
||||||
let name = String::from("Magic Leap VR Display");
|
let name = String::from("Magic Leap VR Display");
|
||||||
let (service, heartbeat) =
|
let (service, heartbeat) =
|
||||||
MagicLeapVRService::new(name, ctxt, gl.clone()).expect("Failed to create VR service");
|
MagicLeapVRService::new(name, ctxt, gl.clone()).expect("Failed to create VR service");
|
||||||
let service = Box::new(service);
|
let service = Box::new(service);
|
||||||
let heartbeat = Box::new(heartbeat);
|
let heartbeat = Box::new(heartbeat);
|
||||||
|
VRInitOptions::VRService(service, heartbeat)
|
||||||
|
};
|
||||||
let opts = InitOptions {
|
let opts = InitOptions {
|
||||||
args,
|
args,
|
||||||
url: Some(url.to_string()),
|
url: Some(url.to_string()),
|
||||||
density: hidpi,
|
density: hidpi,
|
||||||
enable_subpixel_text_antialiasing: false,
|
enable_subpixel_text_antialiasing: false,
|
||||||
vr_init: VRInitOptions::VRService(service, heartbeat),
|
vr_init,
|
||||||
coordinates,
|
coordinates,
|
||||||
};
|
};
|
||||||
let wakeup = Box::new(EventLoopWakerInstance);
|
let wakeup = Box::new(EventLoopWakerInstance);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue