Skip to content

Commit

Permalink
Merge pull request cocos#1255 from pandamicro/v1.3
Browse files Browse the repository at this point in the history
Fix JSB android acceleration x, y reversed issue
  • Loading branch information
pandamicro authored Nov 1, 2016
2 parents ccb2dcf + 627425a commit 77b7496
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cocos2d/core/event-manager/CCSystemEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ var SystemEvent = cc.Class({
callback: function (accelEvent, event) {
event.type = EventType.DEVICEMOTION;
// fix android acc values are opposite
if (cc.sys.os === cc.sys.OS_ANDROID &&
if (!CC_JSB && cc.sys.os === cc.sys.OS_ANDROID &&
cc.sys.browserType !== cc.sys.BROWSER_TYPE_MOBILE_QQ) {
event.acc = cc.p(-accelEvent.x, -accelEvent.y);
}
else {
event.acc = accelEvent;
event.acc = cc.p(accelEvent.x, accelEvent.y);
}
cc.systemEvent.dispatchEvent(event);
}
Expand Down

0 comments on commit 77b7496

Please sign in to comment.