From 35505505687494556ba48b0fd8851c0e7abc7f34 Mon Sep 17 00:00:00 2001 From: fape Date: Mon, 24 Dec 2012 17:24:10 +0100 Subject: [PATCH] marmalade acceleromater improvement --- cocos2dx/platform/marmalade/CCApplication.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cocos2dx/platform/marmalade/CCApplication.cpp b/cocos2dx/platform/marmalade/CCApplication.cpp index 25370cea71..bd469fd544 100644 --- a/cocos2dx/platform/marmalade/CCApplication.cpp +++ b/cocos2dx/platform/marmalade/CCApplication.cpp @@ -122,7 +122,8 @@ void CCApplication::ccAccelerationUpdate() { // Accelerometer doesn't work on Marmalade X86 MacOS-X simulator #if !(defined(__APPLE__) && defined(I3D_ARCH_X86)) - CCAccelerometer::sharedAccelerometer()->update((float)s3eAccelerometerGetX(), (float)s3eAccelerometerGetY(), (float)s3eAccelerometerGetZ(), s3eTimerGetMs()); // MH: Added casting to float + CCDirector* pDirector = CCDirector::sharedDirector(); + pDirector->getAccelerometer()->update((float)s3eAccelerometerGetX(), (float)s3eAccelerometerGetY(), (float)s3eAccelerometerGetZ(), s3eTimerGetMs()); // MH: Added casting to float #endif }