mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
Add a check that windowId is 0 by default (#14159)
This commit is contained in:
+2
-1
@@ -588,7 +588,8 @@ export class View extends Eventify(System) {
|
||||
}
|
||||
|
||||
private _updateAdaptResult (width: number, height: number, windowId?: number) {
|
||||
cclegacy.director.root.resize(width, height, windowId === undefined ? 1 : windowId);
|
||||
// The default invalid windowId is 0
|
||||
cclegacy.director.root.resize(width, height, (windowId === undefined || windowId === 0) ? 1 : windowId);
|
||||
// Frame size changed, do resize works
|
||||
const w = this._designResolutionSize.width;
|
||||
const h = this._designResolutionSize.height;
|
||||
|
||||
Reference in New Issue
Block a user