Fixing magnetometer on iOS

(cherry picked from commit 4b7d1d8c15)
This commit is contained in:
BastiaanOlij 2017-03-21 23:50:53 +11:00 committed by Rémi Verschelde
parent af282b56fe
commit a0b0dff6fd

View file

@ -299,8 +299,8 @@ static int frame_count = 0;
if (!motionInitialised) {
motionManager = [[CMMotionManager alloc] init];
if (motionManager.deviceMotionAvailable) {
motionManager.deviceMotionUpdateInterval = 1.0/70.0;
[motionManager startDeviceMotionUpdates];
motionManager.deviceMotionUpdateInterval = 1.0/70.0;
[motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXMagneticNorthZVertical];
motionInitialised = YES;
};
};