Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cocos2dx/platform/uphone/CCAccelerometer_uphone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void CCAccelerometer::addDelegate(CCAccelerometerDelegate* pDelegate)
}
}

void CCAccelerometer::didAccelerate(UIAcceleration* pAccelerationValue)
void CCAccelerometer::didAccelerate(CCAcceleration* pAccelerationValue)
{
CCAccelerometerHandler *pHandler;
CCAccelerometerDelegate *pDelegate;
Expand Down
2 changes: 1 addition & 1 deletion cocos2dx/platform/uphone/CCAccelerometer_uphone.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class CC_DLL CCAccelerometer
/**
@brief call delegates' didAccelerate function
*/
void didAccelerate(UIAcceleration* pAccelerationValue);
void didAccelerate(CCAcceleration* pAccelerationValue);

protected:
typedef CCMutableArray<CCAccelerometerHandler*> AccDelegateArray;
Expand Down
5 changes: 2 additions & 3 deletions cocos2dx/platform/uphone/CCEGLView_uphone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,7 @@ Boolean CCEGLView::EventHandler(TApplication * pApp, EventType * pEvent)
{
bHandled = CCKeypadDispatcher::sharedDispatcher()->dispatchKeypadMSG(kTypeBackClicked);
}
else if (pEvent->sParam1 == SYS_KEY_SOFTKEY_LEFT_UP ||
pEvent->sParam1 == SYS_KEY_SOFTKEY_LEFT_LONG)
else if (pEvent->sParam1 == KEY_COMMAND_MAINMENU)
{
bHandled = CCKeypadDispatcher::sharedDispatcher()->dispatchKeypadMSG(kTypeMenuClicked);
}
Expand All @@ -309,7 +308,7 @@ Boolean CCEGLView::EventHandler(TApplication * pApp, EventType * pEvent)
TG3_SENSOR_TYPE_ACCELEROMETER == data.sensorMask)
{
// convert the data to iphone format
UIAcceleration AccValue;
CCAcceleration AccValue;
AccValue.x = -(data.acceleration.x / TG3_GRAVITY_EARTH);
AccValue.y = -(data.acceleration.y / TG3_GRAVITY_EARTH);
AccValue.z = -(data.acceleration.z / TG3_GRAVITY_EARTH);
Expand Down