summaryrefslogtreecommitdiff
path: root/modules/arkit/arkit_interface.mm
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-22 21:11:02 +0200
committerGitHub <noreply@github.com>2019-07-22 21:11:02 +0200
commita36e09f39881fee2fe2da7ed89b76330202834bf (patch)
treedf0525cfa46984922e82a4ee4adf645756bfc0df /modules/arkit/arkit_interface.mm
parent5dae2ea777da5395cf1b1e9a8bc6abc93f6ae6bb (diff)
parent77724fde60f683352f102b82a815cc84667ebdf5 (diff)
Merge pull request #30759 from akien-mga/ios-camera-type-mismatch
Fix type mismatch in iOS interface orientation checks
Diffstat (limited to 'modules/arkit/arkit_interface.mm')
-rw-r--r--modules/arkit/arkit_interface.mm12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/arkit/arkit_interface.mm b/modules/arkit/arkit_interface.mm
index de58f93276..68844c54c2 100644
--- a/modules/arkit/arkit_interface.mm
+++ b/modules/arkit/arkit_interface.mm
@@ -430,7 +430,7 @@ void ARKitInterface::process() {
// get some info about our screen and orientation
Size2 screen_size = OS::get_singleton()->get_window_size();
- UIDeviceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
+ UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
// Grab our camera image for our backbuffer
CVPixelBufferRef pixelBuffer = current_frame.capturedImage;
@@ -531,7 +531,7 @@ void ARKitInterface::process() {
// we need to invert this, probably row v.s. column notation
affine_transform = CGAffineTransformInvert(affine_transform);
- if (orientation != UIDeviceOrientationPortrait) {
+ if (orientation != UIInterfaceOrientationPortrait) {
affine_transform.b = -affine_transform.b;
affine_transform.d = -affine_transform.d;
affine_transform.ty = 1.0 - affine_transform.ty;
@@ -582,28 +582,28 @@ void ARKitInterface::process() {
// copy our current frame transform
matrix_float4x4 m44 = camera.transform;
- if (orientation == UIDeviceOrientationLandscapeLeft) {
+ if (orientation == UIInterfaceOrientationLandscapeLeft) {
transform.basis.elements[0].x = m44.columns[0][0];
transform.basis.elements[1].x = m44.columns[0][1];
transform.basis.elements[2].x = m44.columns[0][2];
transform.basis.elements[0].y = m44.columns[1][0];
transform.basis.elements[1].y = m44.columns[1][1];
transform.basis.elements[2].y = m44.columns[1][2];
- } else if (orientation == UIDeviceOrientationPortrait) {
+ } else if (orientation == UIInterfaceOrientationPortrait) {
transform.basis.elements[0].x = m44.columns[1][0];
transform.basis.elements[1].x = m44.columns[1][1];
transform.basis.elements[2].x = m44.columns[1][2];
transform.basis.elements[0].y = -m44.columns[0][0];
transform.basis.elements[1].y = -m44.columns[0][1];
transform.basis.elements[2].y = -m44.columns[0][2];
- } else if (orientation == UIDeviceOrientationLandscapeRight) {
+ } else if (orientation == UIInterfaceOrientationLandscapeRight) {
transform.basis.elements[0].x = -m44.columns[0][0];
transform.basis.elements[1].x = -m44.columns[0][1];
transform.basis.elements[2].x = -m44.columns[0][2];
transform.basis.elements[0].y = -m44.columns[1][0];
transform.basis.elements[1].y = -m44.columns[1][1];
transform.basis.elements[2].y = -m44.columns[1][2];
- } else if (orientation == UIDeviceOrientationPortraitUpsideDown) {
+ } else if (orientation == UIInterfaceOrientationPortraitUpsideDown) {
// this may not be correct
transform.basis.elements[0].x = m44.columns[1][0];
transform.basis.elements[1].x = m44.columns[1][1];