update resolution size after resize (#7860)

This commit is contained in:
minggo
2020-11-25 09:44:46 +08:00
committed by GitHub
parent 4b9afa440e
commit 02010bba58
+6
View File
@@ -41,6 +41,12 @@ jsb.onResume = function () {
jsb.onResize = function (size) {
if (size.width === 0 || size.height === 0) return;
window.resize(size.width, size.height);
cc.sys.windowPixelResolution = {
width: size.width,
height: size.height,
};
cc.view.setCanvasSize(window.innerWidth, window.innerHeight);
};