Skip to content

Commit 66868f7

Browse files
author
linshun
committed
issue cocos2d#1446: only 60fps will active requestAnimaFrame.
1 parent 9b361b6 commit 66868f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos2d/platform/CCApplication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ cc.Application = cc.Class.extend(/** @lends cc.Application# */{
235235
return 0;
236236
}
237237
// TODO, need to be fixed.
238-
if (window.requestAnimFrame) {
238+
if (window.requestAnimFrame && this._animationInterval == 1/60) {
239239
var callback = function () {
240240
cc.Director.getInstance().mainLoop();
241241
window.requestAnimFrame(callback);

0 commit comments

Comments
 (0)