Skip to content
Permalink
Browse files

Fixed magicleap Servo2D application

  • Loading branch information...
asajeffrey committed Jun 14, 2019
1 parent 5f4074a commit b5bd3ad7eaa5c118a4496233af730db8f06c1fa7
Showing with 11 additions and 6 deletions.
  1. +11 −6 ports/libmlservo/src/lib.rs
@@ -140,17 +140,22 @@ pub unsafe extern "C" fn init_servo(
};
info!("got args: {:?}", args);

let name = String::from("Magic Leap VR Display");
let (service, heartbeat) =
MagicLeapVRService::new(name, ctxt, gl.clone()).expect("Failed to create VR service");
let service = Box::new(service);
let heartbeat = Box::new(heartbeat);
let vr_init = if landscape {
VRInitOptions::None
} else {
let name = String::from("Magic Leap VR Display");
let (service, heartbeat) =
MagicLeapVRService::new(name, ctxt, gl.clone()).expect("Failed to create VR service");
let service = Box::new(service);
let heartbeat = Box::new(heartbeat);
VRInitOptions::VRService(service, heartbeat)
};
let opts = InitOptions {
args,
url: Some(url.to_string()),
density: hidpi,
enable_subpixel_text_antialiasing: false,
vr_init: VRInitOptions::VRService(service, heartbeat),
vr_init,
coordinates,
};
let wakeup = Box::new(EventLoopWakerInstance);

0 comments on commit b5bd3ad

Please sign in to comment.
You can’t perform that action at this time.