diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-06-15 05:53:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-15 05:53:19 -0400 |
commit | fd174c54ef4fa6574ae782dacccaeccd14abb936 (patch) | |
tree | f6000f94fae7c97437a1cf63751155cbefc9536d | |
parent | 6824f42b11b2865e06216fd042d29f772208a11a (diff) | |
parent | b5bd3ad7eaa5c118a4496233af730db8f06c1fa7 (diff) | |
download | servo-fd174c54ef4fa6574ae782dacccaeccd14abb936.tar.gz servo-fd174c54ef4fa6574ae782dacccaeccd14abb936.zip |
Auto merge of #23576 - asajeffrey:magicleap-fix-servo2d, r=Manishearth
Fixed magicleap Servo2D application
<!-- Please describe your changes on the following line: -->
Sigh, of course the latest changes for immersive Servo on the ML1 broke the landscape app.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because we don't have a way to smoke-test on the ML1
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23576)
<!-- Reviewable:end -->
-rw-r--r-- | ports/libmlservo/src/lib.rs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/ports/libmlservo/src/lib.rs b/ports/libmlservo/src/lib.rs index a94a32e6930..ff989b64432 100644 --- a/ports/libmlservo/src/lib.rs +++ b/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); |