8000 taobao minigame when pad rotate the game, the window will adjust in an inappropriate way. · Issue #17004 · cocos/cocos-engine · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
taobao minigame when pad rotate the game, the window will adjust in an inappropriate way. #17004
Closed
@tangkaikk

Description

@tangkaikk

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0