适配问题
This commit is contained in:
@@ -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}`)
|
||||
|
||||
Reference in New Issue
Block a user