Skip to content
New issue

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

taobao minigame when pad rotate the game, the window will adjust in an inappropriate way. #17004

Open
tangkaikk opened this issue May 17, 2024 · 1 comment
Assignees
Labels
Bug QA: Open Issue ticket opened by QA team
Milestone

Comments

@tangkaikk
Copy link

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

@tangkaikk tangkaikk added Bug Needs Triage Needs to be assigned by the team labels May 17, 2024
@bofeng-song bofeng-song added this to the 3.8.5 milestone Jun 5, 2024
@bofeng-song bofeng-song self-assigned this Jun 5, 2024
@bofeng-song bofeng-song removed the Needs Triage Needs to be assigned by the team label Jun 5, 2024
@minggo minggo added the QA: Open Issue ticket opened by QA team label Jun 5, 2024
@bofeng-song
Copy link
Contributor

2.4.x fixed PR
3.8.x fixed PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug QA: Open Issue ticket opened by QA team
Projects
None yet
Development

No branches or pull requests

3 participants