Description
Cocos Creator version
2.4.12, 2.4.13, 3.7.4,3.8.2
System information
pad
Issue description
taobao minigame when pad rotate the game, the window will adjust in a wrong way.
to solve this problem, here is the ttemporary solution:
1.find the script screen-adapter.ts (C:\ProgramData\cocos\editors\Creator\3.8.2\resources\resources\3d\engine\pal\screen-adapter\minigame\screen-adapter.ts)
2.modify the windowSize function below:
public get windowSize (): Size {
const sysInfo = minigame.getSystemInfoSync();
const dpr = this.devicePixelRatio;
let screenWidth = sysInfo.windowWidth;
let screenHeight = sysInfo.windowHeight;
if (BYTEDANCE) {
screenWidth = sysInfo.screenWidth;
screenHeight = sysInfo.screenHeight;
}
if (ALIPAY && rotateLandscape && screenWidth < screenHeight) {
const temp = screenWidth;
screenWidth = screenHeight;
screenHeight = temp;
}
if(TAOBAO_MINIGAME){
var windowInfo = minigame.getWindowInfoSync();
screenWidth = windowInfo.screenWidth;
screenHeight = windowInfo.screenHeight;
}
return new Size(screenWidth * dpr, screenHeight * dpr);
}
Relevant error log output
none
Steps to reproduce
1.generate a taobao minigame
2.generate the qrcode
3. with pad to scan the qrcode
4. rotate the pad.