summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/iphone/app_delegate.mm2
-rw-r--r--platform/iphone/os_iphone.cpp7
2 files changed, 6 insertions, 3 deletions
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm
index f65599a35a..453ab85e3f 100644
--- a/platform/iphone/app_delegate.mm
+++ b/platform/iphone/app_delegate.mm
@@ -332,7 +332,7 @@ static int frame_count = 0;
if (motionInitialised) {
///@TODO is this the right place to clean this up?
[motionManager stopDeviceMotionUpdates];
- // no free ?
+ [motionManager release];
motionManager = nil;
motionInitialised = NO;
};
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index a30d1c7194..cfd2a844c6 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -325,6 +325,7 @@ static const float ACCEL_RANGE = 1;
void OSIPhone::update_accelerometer(float p_x, float p_y, float p_z) {
+ ///@TODO I've made the Z negative like the original accelerometer code, this probably needs more work
input->set_accelerometer(Vector3(p_x / (float)ACCEL_RANGE, p_y / (float)ACCEL_RANGE, -p_z / (float)ACCEL_RANGE));
/*
@@ -365,11 +366,13 @@ void OSIPhone::update_accelerometer(float p_x, float p_y, float p_z) {
};
void OSIPhone::update_magnetometer(float p_x, float p_y, float p_z) {
- input->set_magnetometer(Vector3(p_x, p_y, p_z));
+ ///@TODO I've made the Z negative like the original accelerometer code, this probably needs more work
+ input->set_magnetometer(Vector3(p_x, p_y, -p_z));
};
void OSIPhone::update_gyroscope(float p_x, float p_y, float p_z) {
- input->set_gyroscope(Vector3(p_x, p_y, p_z));
+ ///@TODO I've made the Z negative like the original accelerometer code, this probably needs more work
+ input->set_gyroscope(Vector3(p_x, p_y, -p_z));
};
void OSIPhone::delete_main_loop() {