Skip to content

Commit 5bb9351

Browse files
committed
Merge pull request cocos2d#3169 from pandamicro/develop
Fix setRealPixelResolution not working on some devices
2 parents 8737f56 + 64117c1 commit 5bb9351

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos2d/core/platform/CCEGLView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ cc.EGLView = cc.Class.extend(/** @lends cc.view# */{
694694
*/
695695
setRealPixelResolution: function (width, height, resolutionPolicy) {
696696
// Set viewport's width
697-
this._setViewportMeta({"width": width, "user-scalable": "no"}, true);
697+
this._setViewportMeta({"width": width, "target-densitydpi": cc.DENSITYDPI_DEVICE, "user-scalable": "no"}, true);
698698

699699
// Set body width to the exact pixel resolution
700700
document.body.style.width = width + "px";

0 commit comments

Comments
 (0)