From 09979e21e744acb497020628d5e36d7e1ec6f7b5 Mon Sep 17 00:00:00 2001 From: yangwen Date: Wed, 28 May 2025 17:32:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings/PlayerSettings.json | 5 +++-- src/Entry.ts | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/settings/PlayerSettings.json b/settings/PlayerSettings.json index 8999245..78c0abb 100644 --- a/settings/PlayerSettings.json +++ b/settings/PlayerSettings.json @@ -1,7 +1,8 @@ { "resolution": { - "designWidth": 1920, - "designHeight": 1080, + "designWidth": 1080, + "designHeight": 1920, + "scaleMode": "fixedauto", "backgroundColor": "rgba(245, 247, 251, 1)" }, "modules": { diff --git a/src/Entry.ts b/src/Entry.ts index f5e6ae5..a9b41bf 100644 --- a/src/Entry.ts +++ b/src/Entry.ts @@ -7,13 +7,11 @@ Laya.addBeforeInitCallback((stageConfig) => { if (window.innerWidth > window.innerHeight) { stageConfig.designWidth = config.DESIGN_HEIGHT stageConfig.designHeight = config.DESIGN_WIDTH - stageConfig.scaleMode = "fixedauto" config.H_SCREEN = true } else { stageConfig.designWidth = config.DESIGN_WIDTH stageConfig.designHeight = config.DESIGN_HEIGHT - stageConfig.scaleMode = "fixedheight" config.H_SCREEN = false } console.log(`横屏=${config.H_SCREEN}`)