diff --git a/pal/minigame/wechat.ts b/pal/minigame/wechat.ts index 3fb0faa855..2ee605fa08 100644 --- a/pal/minigame/wechat.ts +++ b/pal/minigame/wechat.ts @@ -150,7 +150,7 @@ Object.defineProperty(minigame, 'isLandscape', { }); // init landscapeOrientation as LANDSCAPE_RIGHT let landscapeOrientation = Orientation.LANDSCAPE_RIGHT; -if (devideInfo.platform.toLocaleLowerCase() !== 'android') { +if (devideInfo.platform.toLocaleLowerCase() !== 'android' && !globalThis.runOnPlayableMode) { // onDeviceOrientationChange doesn't work well on Android. // see this issue: https://developers.weixin.qq.com/community/minigame/doc/000482138dc460e56cfaa5cb15bc00 wx.onDeviceOrientationChange((res) => { diff --git a/pal/system-info/minigame/system-info.ts b/pal/system-info/minigame/system-info.ts index d08b4adbe2..80a2aeec95 100644 --- a/pal/system-info/minigame/system-info.ts +++ b/pal/system-info/minigame/system-info.ts @@ -263,7 +263,9 @@ class SystemInfo extends EventTarget { this._initPromise.push(this._supportsWebpPromise()); - this._registerEvent(); + if (!globalThis.runOnPlayableMode) { + this._registerEvent(); + } } private _supportsWebpPromise (): Promise {