We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.4.12, 2.4.13, 3.7.4,3.8.2
pad
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); }
none
1.generate a taobao minigame 2.generate the qrcode 3. with pad to scan the qrcode 4. rotate the pad.
NewProject.zip
The text was updated successfully, but these errors were encountered:
2.4.x fixed PR 3.8.x fixed PR
Sorry, something went wrong.
bofeng-song
No branches or pull requests
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.
Minimal reproduction project
NewProject.zip
The text was updated successfully, but these errors were encountered: