We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e80dd1c commit c9de2b5Copy full SHA for c9de2b5
cocos2d/core/platform/CCEGLView.js
@@ -900,7 +900,7 @@ cc.ContainerStrategy = cc.Class.extend(/** @lends cc.ContainerStrategy# */{
900
// Setup pixel ratio for retina display
901
var devicePixelRatio = view._devicePixelRatio = 1;
902
if (view.isRetinaEnabled())
903
- devicePixelRatio = view._devicePixelRatio = window.devicePixelRatio || 1;
+ devicePixelRatio = view._devicePixelRatio = Math.min(2, window.devicePixelRatio || 1);
904
// Setup canvas
905
locCanvasElement.width = w * devicePixelRatio;
906
locCanvasElement.height = h * devicePixelRatio;
0 commit comments